分享

写回答

发帖

[提问] 求助,新买的一个月Deluxe Linux空间,子目录php不能访问?

GoDaddy GoDaddy 1555 人阅读 | 5 人回复

发表于 2010-5-6 14:07:28 | 显示全部楼层 |阅读模式

求助,新买的一个月Deluxe Linux空间,子目录里的index.php, phpinfo.php都不能访问?

是不是哪里设置有问题呢?谢谢

访问index.php(这里写的是hello word的代码) 的时候出现如下代码
  1. <?php
  2. // pageok
  3. // managed by puppet - hostingcms02
  4. header("Content-type: text/plain");

  5. // Total size of directory
  6. $totalSize = 0;

  7. // List of files in cwd
  8. $dir  = opendir('.');
  9. while (($filename = readdir($dir)) ==! false) {
  10.    $files[] = $filename;
  11. }

  12. // The results of filesize are cached, clear that cache
  13. clearstatcache();

  14. // Total file sizes
  15. foreach ($files as $file) {
  16.   // Add file to total size
  17.   $totalSize += filesize($file);
  18. }

  19. echo "pageok\n\n";
  20. echo "Directory Size: $totalSize\n\n";

  21. ?>
复制代码

回答|共 5 个

开心私塾

发表于 2010-5-6 14:19:11 | 显示全部楼层

你的文件权限设置的是否正确?

412412

发表于 2010-5-6 14:32:20 | 显示全部楼层

这还和文件夹权限有关系吗?我只要求能访问php文件,应该只要读权限就够了吧?现在把hello word的php文件放到子目录里也不能访问呢,文件名改成hello.php,竟然提示404 Not Found, 晕了

samer

发表于 2010-5-6 15:16:21 | 显示全部楼层

你的是windows还是linux?

412412

发表于 2010-5-6 15:20:49 | 显示全部楼层

Deluxe Linux空间

add.c

发表于 2010-5-6 23:14:22 | 显示全部楼层

问题有点奇怪, 你安装一下WordPress或者其它的php程序看看是否都是这个错误
html静态页面呢?
另外查看下是否你主机还没有设置好? 这个情况等等即可
您需要登录后才可以回帖 登录 | 注册

本版积分规则