<?php
  $dir1=dir(`c:\\winnt`);
  echo gettype($dir1)."<br>";
  echo "handle:".$dir1->handle."<br>";
  echo "path:".$dir1->path."<br>";
  while($entry=$dir1->read())
    echo $entry."<br>";
  $dir1->close();
?>
把我改的考过去试试...

解决方案 »

  1.   

    TO:visam168
    我试过了,不行,我用的是WAPM,但改为:$dir1=dir("./").就可以了.是不是WAPM设置的原因?谢谢.
      

  2.   

    open_basedir restriction in effect. = open_basedir 受限,目录不让访问
      

  3.   

    PHP.ini里可以加入允许访问的目录
    ; open_basedir, if set, limits all file operations to the defined directory
    ; and below.  This directive makes most sense if used in a per-directory
    ; or per-virtualhost web server configuration file. This directive is
    ; *NOT* affected by whether Safe Mode is turned On or Off.
    ;open_basedir = C:/Winnt;D:/Usr
      

  4.   

    TO Meterorlet:
    我试过了,还是不行。open_basedir = c:/winnt;d:/usr;前面的;是不是去了,别外/是不是改成\,=前后是否有空格?
      

  5.   

    open_basedir = "c:\winnt;d:\usr";