php require 语句在上传到主机时不起作用
php require statement not working when uploaded to host
我有一个 php 文件存在 /php/dbtest。php
它在我的本地机器上运行得非常好,运行 xampp 我已经将它上传到 Linux 网络主机上,现在行
require '/../app/start.php'
我试过回显 error_get_last() 但它 returns 什么也没有。我不确定问题是什么或下一步我试过没有正斜杠的地方。非常感谢所有帮助
你的link应该不太好吧。因为第一个 /,你引用了你的 linux 系统的根目录,一般网站都包含在 /etc/www 中。所以试试 :
require '../app/start.php'
或更link您的文档在系统中的显示方式。
我有一个 php 文件存在 /php/dbtest。php
它在我的本地机器上运行得非常好,运行 xampp 我已经将它上传到 Linux 网络主机上,现在行
require '/../app/start.php'
我试过回显 error_get_last() 但它 returns 什么也没有。我不确定问题是什么或下一步我试过没有正斜杠的地方。非常感谢所有帮助
你的link应该不太好吧。因为第一个 /,你引用了你的 linux 系统的根目录,一般网站都包含在 /etc/www 中。所以试试 :
require '../app/start.php'
或更link您的文档在系统中的显示方式。