我的代码是这样的
$fp = fopen('text.php', 'w');
fwrite($fp, $_POST['code']);
fclose($fp);
Run Code Online (Sandbox Code Playgroud)
但如果$_POST['code']单引号(')输出将是2个单引号,例如:
如果输入是'test'
如果我们打开text.php输出会
''测试''
我也试过file_put_contents(),但结果相同我怎样才能解决这个问题?
编辑
因为$_POST['code']; exit()我也得到相同的输出