这可能是一个荒谬的问题,但它一直困扰着我.
我有一个邮件转发器管道传输到 PHP脚本,它收到完美,但我有以下错误邮寄给我立即:
原文链接:https://www.f2er.com/php/133018.html我有一个邮件转发器管道传输到 PHP脚本,它收到完美,但我有以下错误邮寄给我立即:
A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) Failed: pipe to |/home/[webroot]/public_html/external/mobile/email.PHP generated by mobile@[mydomain] The following text was generated during the delivery attempt: X-Powered-By: PHP/5.2.13 Content-type: text/html
正如您所看到的,Exim认为标题响应是我脚本的错误.该脚本可以完美地从PHP:// stdin接收电子邮件,但Exim快速回复错误.
加,
>它从控制台运行,而不是Apache,所以HTAccess或配置Apache很可能什么都不做.
>我找不到任何解决方案,或任何有同样问题的人.
所以我的问题是:如何摆脱这两个标题?
谢谢,
〜强尼
编辑,来源:
#!/usr/bin/PHP <?PHP $fd = fopen("PHP://stdin","r"); $email = ""; while (!feof($fd)) { $email .= fread($fd,1024); } fclose($fd); $dat = fopen(dirname(__FILE__).'/test.txt','w'); fwrite($dat,$email); fclose($dat);