PHP: I get a completely blank page, I don't know how to debug this in PHP

后端 未结 5 743
执笔经年
执笔经年 2021-01-22 06:04

I\'m having some issues to debug this in php. When I include this line:

require_once(\"http://\" . $_SERVER[\"HTTP_HOST\"] . \"/dompdf/dompdf_config.inc.php\");
         


        
5条回答
  •  旧时难觅i
    2021-01-22 06:24

    You should not require/include a remote file like this. Instead provide the local absolute or relative path.

    Though insecure and not recommended, it is technically possible to do if certain configuration options are set. (allow_url_include)

    See other answers below regarding display_errors for future debugging concerns. I often use the PHP command line interpreter to get the real error, without allowing error details to be presented to web visitors.

提交回复
热议问题