Jump to content

Can't seem to read the contents of other directories


pneudralics

Recommended Posts

I eventually want to make a section to edit a slideshow. I can't get it to read the subdirectories under the slideshow directory unless I put editslideshow.php and change the $search_dir = '.'

 

called from connect.php

SLIDESHOWPATH = "C:/wamp/www/slideshow/";

 

/includes/editslideshow.php

//Set directory
$search_dir = SLIDESHOWPATH;
$dp = opendir ($search_dir);
echo SLIDESHOWPATH;

//List directories
while ($item = readdir ($dp) ) {
if ( (is_dir ($item)) AND (substr($item, 0, 1) != '.') ) {
	echo "$item<br />\n";
}
}

rewinddir ($dp); //Reset pointer

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.