0
以下代码不会创建info.txt文件并死亡: 如何在这种情况下显示错误代码 - 用“。”附加到死命令?将用户输入写入文件
$MorF .= $name ." ". $family;
$MorF .="with username " . $user;
$MorF .=" and password " . $pass;
$MorF .=" lives in " . $city;
$fileLines = "";
if (file_exists("info.txt"))
{
$fileLines = file_get_contents("info.txt");
$fileNewLines = $fileLines . $MorF . "\n";
file_put_contents("info.txt", $fileNewLines);
}
else
{
die("Something went wrong !");
}
@Skaffman我意识到阿拉伯可能看起来像perl的,但它仍然是PHP :) – Tim 2011-02-17 20:01:27