Question
scandir()
i have this script that uses Scandir(), which apparently is
used in the newer version of php that i am using "php5" .
this is the code : -- and i get this error
Fatal error: Call to undefined function: scandir() in /home/therainb/public_html/myphp2/images.php on line 47
$dir = 'uploads'; // Define the directory to view.
$files = scandir($dir); // Read all the images into an array. THIS IS MY LINE 47
// Display each image caption as a linkto the javaScript function.
foreach ($files as $image) {
if (substr($image, 0, 1) != '.') { // Ignore anything starting with a period.
// Get the image's size in pixels.
$image_size = getimagesize("$dir/$image");
What do i need to replace instead of scandir() guys ?
thank you again
this is the code : -- and i get this error
Fatal error: Call to undefined function: scandir() in /home/therainb/public_html/myphp2/images.php on line 47
$dir = 'uploads'; // Define the directory to view.
$files = scandir($dir); // Read all the images into an array. THIS IS MY LINE 47
// Display each image caption as a linkto the javaScript function.
foreach ($files as $image) {
if (substr($image, 0, 1) != '.') { // Ignore anything starting with a period.
// Get the image's size in pixels.
$image_size = getimagesize("$dir/$image");
What do i need to replace instead of scandir() guys ?
thank you again
