PHP問題集合

來源:互聯網
上載者:User
3.新手嘗試php mail發送遇到:Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in.....

原因:smtp伺服器不正確或連接埠不正確。。我這裡用到的是qq郵箱發送。

解決方案:在php.ini 仲設定,並重啟。

[mail function]; For Win32 only.SMTP = smtp.qq.com smtp_port = 25; For Win32 only.sendmail_from = PHP_INI_ALL

設定後,開啟qq郵箱smtp/pop3服務,

重新測試出現如下問題:SMTP server response: 503 Error: need EHLO and AUTH first !

原因,可能進行了多次惡意登陸,這是由於自己寫的php發送郵箱步驟不正確。

在發送郵箱前,需進行登陸握手。

2.試著寫幾句php 命令遇到:parse error, unexpected T_CONSTANT_ENCAPSED_STRING

原因:詞法分析錯誤,不被期望的字元常量問題。可能是關鍵字打錯,或者{},“”之類的不匹配。

解決方案:在指定的錯誤行仔細檢查一遍。

1.在安裝完成後運行PHP測試檔案,遇到:403 Forbidden:You don't have permission to access XXX.php/ on this server

原因:檔案存取權限

解決辦法:開啟apache的httpd.conf,找到,把整個區塊替換成:  Options FollowSymLinks  AllowOverride None  Order allow,deny  allow from all        ;這裡把deny設定為allow.儲存,重啟apache,OK了。

  

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.