PHP错误 - 无法打开文件
我建立一个小的PHP系统,我可以像CSS样式没有打开的文件,PHP包括功能和图像。PHP错误 - 无法打开文件
我也得到了一些错误:
Warning: include(includes/functions.php) [function.include]: failed to open stream: No such file or directory in /home/chezki/public_html/XXX.XXX/cp/CMS/index.php on line 2
Warning: include(includes/functions.php) [function.include]: failed to open stream: No such file or directory in /home/chezki/public_html/XXX.XXX/cp/CMS/index.php on line 2
Warning: include() [function.include]: Failed opening 'includes/functions.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/chezki/public_html/XXX.XXX/cp/CMS/index.php on line 2
Built by YYY.YYY
logo // Thats the Logo alt
Fatal error: Call to undefined function getlists() in /home/chezki/public_html/XXX.XXX/cp/CMS/index.php on line 28
Title Actions // Some images alt
编辑:在Windows中,这是好的,但在Linux上,这是在做这些错误 更多编辑:解决
您有权限的问题。由于权限错误,您的Web服务器无法读取functions.php。用chown和chmod调整权限。
-1。如果它是权限,它会是“权限被拒绝”,而不是“没有这样的文件”。 – 2013-03-06 15:41:06
好的,谢谢你,我解决了我的问题 – 2013-03-06 16:43:52
从你的错误消息,你的脚本似乎是这样的:
/home/chezki/public_html/XXX.XXX/cp/CMS/index.php
您正在试图加载该文件:既然你收到此错误信息
includes/functions.php
:
没有这样的文件或目录
...明显的结论是,这个文件不存在:
/home/chezki/public_html/XXX.XXX/cp/CMS/includes/functions.php
随意编辑您的问题,并提供更多的细节,如果不是这种情况。
编辑:文件必须有一个准确的名字。如果它被称为例如Functions.php
,这是一个不同的文件。
我使用了确切的文件名**修复**它似乎是一个大写小写Problam – 2013-03-06 16:21:59
@NoamLahmi - 这就是我在编辑中所说的。如果它使用不同的情况,它是一个不同的文件。 – 2013-03-06 16:28:33
你认为那是什么*没有这样的文件或目录*意味着什么? – 2013-03-06 15:37:14
你有没有尝试在包含路径前放一个'。/'(代表“当前目录”)? – anroesti 2013-03-06 15:39:16
@anroesti:没必要。 include_path已经包含了''' – 2013-03-06 15:40:44