|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-05-05 19:40 UTC] xuefer at 21cn dot com
Description:
------------
path without driver letter(c: d:) failed to work
while other filesystem functions(file_get_contents/fopen) works
under *windows*
Reproduce code:
---------------
<?php
var_dump(glob("/abc/*"));
?>
Expected result:
----------------
array with files in $cur_driver:/abc/ ($cur_driver = driver letter of getcwd())
Actual result:
--------------
empty array
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
it takes me so long time to figure it out: no, don't test it under / C:\>mkdir tmp C:\>cd tmp C:\tmp>mkdir abc C:\tmp>echo > abc\def C:\tmp>d:\www\php4\cli\php.exe -r "var_dump(glob('/abc/*'));" array(1) { [0]=> string(8) "/abc/def" } C:\tmp>d:\www\php4\cli\php.exe -r "var_dump(glob('/tmp/abc/*'));" array(0) { }