首頁 > linux > 在多個 web 下開啟 php debug mode(除錯)

在多個 web 下開啟 php debug mode(除錯)

當我們要讓 php 在web頁面顯示錯誤時, 我們可以修改 php.ini 找到以下

display_errors = On

改成 On 啟動, 但這會影響到 Apache 下所有的網站

如果我們在一個 Apache 下有多個網站的話, 就可以如下面所說的做,

比如我要 bbb.bbb.bbb.bbb 的網站開啟 php debug mode(除錯)在

<VirtualHost *:80>

後面加上

php_flag display_errors on

就可以了 ~~ 如下

<VirtualHost *:80>
DocumentRoot "/var/www/xxxxx/"
ServerName bbb.bbb.bbb.bbb
AddDefaultCharset UTF-8
php_flag display_errors on
<Directory "/var/www/xxxxxx/">
allow from all
Options FollowSymLinks MultiViews
</Directory>
</VirtualHost>

好文幫推 :

本站文章歡迎您原文引用, 還請您標示原出處喔 !!

引用網址 :

Categories: linuxTags: ,
  1. 拆組達人
    2009年6月2日09:27 | #1

    網站太多的話
    開啟debug
    主機會超累個的說!

  1. 目前尚無任何 trackbacks 和 pingbacks。