<?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();
?>
把我改的考过去试试...
$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();
?>
把我改的考过去试试...
我试过了,不行,我用的是WAPM,但改为:$dir1=dir("./").就可以了.是不是WAPM设置的原因?谢谢.
; 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
我试过了,还是不行。open_basedir = c:/winnt;d:/usr;前面的;是不是去了,别外/是不是改成\,=前后是否有空格?