Simple Php problem about scandir
Hi, everyone.
I got a problem in php as i don't really know too much php.
My situation is:
My pictures in> "/site/pic/" e.g. "/site/pic/a.jpg"
My php programs in >"/site/phpfile" e.g. "/site/phpfile/testing.php"
OK, now i want to use testing.php to list the files name from /site/pic/ e.g. a.jpg, b.jpg
My code is:
$dir = "/site/pic"
$pics = scandir($dir);
but the scandir doesn't work. How can i scandir the folder when it is upper folder?
Thank you |
|
|