Both scandir and glob can only scan folders, but not files.

to traverse all files in a folder

with scandir and glob, only folders can be scanned, but no files can be scanned.

1> $path = "./upfiles/upload/3223/";
2> $list = scandir($path);
3> $list = glob($path."*");

to scan out files under / 3223 / folder, scandir returns false,glob and returns empty
. If you change the directory to / upload/, you can scan 3223 /
. This should indicate that php does not disable these two functions. Why can"t files be scanned?

Php
Sep.28,2021

if you change the directory to / upload/ , 3223 /
can be scanned.

relative path . / upfiles/upload/3223/ and absolute path / upload/ are not the same directory?

< hr >

2018-10-30

take a look at the file permissions. Does nginx / apache have permissions?
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3772c-2c0a2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3772c-2c0a2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?