使用php输出 that's ok
两种方法:1.使用双引号中插入单引号
2.使用单引号,但是加上转义字符\
3.使用eof输出
代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<?php
//1、使用双引号中插入单引号
echo "this's ok";
echo "<br>";
//2、使用单引号,但是加上转义字符\
echo 'this\'s ok';
echo "<br>";
//3、使用eof输出
echo <<<EOF
this's ok
EOF;
echo "<br>";
?>
</body>
</html>
运行效果: