【发布时间】:2017-03-25 11:29:52
【问题描述】:
我已插入以下链接来传送电子邮件。 链接:public_html/emailer.php 我在 public_html 文件夹中有脚本文件,我正在使用以下脚本: 它应该在目录中创建一个文件,但它不起作用。
#!/public_html/ -q
<?php
/* Read the message from STDIN */
$fd = fopen("php://stdin", "r");
$email = ""; // This will be the variable holding the data.
while (!feof($fd)) {
$email .= fread($fd, 1024);
}
fclose($fd);
/* Saves the data into a file */
$fdw = fopen("pipemail.txt", "w");
fwrite($fdw, $email);
fclose($fdw);
/* Script End */
?>
【问题讨论】:
-
在什么情况下不起作用?
-
它没有创建文件,这意味着脚本根本没有运行,或者我在脚本的第一行有错误。我不知道