它在与脚本相同的目录中创建文件。试试这个吧。
$content = "some text here";$fp = fopen($_SERVER['document_ROOT'] . "/myText.txt","wb");fwrite($fp,$content);fclose($fp);

它在与脚本相同的目录中创建文件。试试这个吧。
$content = "some text here";$fp = fopen($_SERVER['document_ROOT'] . "/myText.txt","wb");fwrite($fp,$content);fclose($fp);