📜  警告:include():https:在服务器配置中通过allow_url_include = 0禁用包装器 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:26.180000             🧑  作者: Mango

代码示例1
From the PHP docs on include:

If "URL include wrappers" are enabled in PHP, you can specify the file to be included using a URL (via HTTP or other supported wrapper - see Supported Protocols and Wrappers for a list of protocols) instead of a local pathname. If the target server interprets the target file as PHP code, variables may be passed to the included file using a URL request string as used with HTTP GET. This is not strictly speaking the same thing as including the file and having it inherit the parent file's variable scope; the script is actually being run on the remote server and the result is then being included into the local script.

By obvious inference, you are supposed to use a local pathname!

Change this line


to this


The reason that allow_url_include=On doesn't work is because you probably didn't restart your Apache server after changing your php.ini