Jump to content

can't open a folder


maxelcat

Recommended Posts

Hi

 

I am trying to get the structure of some folders/files on my server to create an xml "Feed" which then goes to a flash file. 

 

I keep getting the error message that I can't open the folder (it is set to 755)

ERROR: Could not open folder: http://www.name/templates/bluezoo/mp3s

 

What am I doing wrong please.

 

Many thanks in advance

 

Edward

 

Here's some php:

$directoryLocation="http://www.name/templates/bluezoo/mp3s";

// XML Doctype
$xml = new DomDocument('1.0', 'UTF-8');
$xml->xmlStandalone = false;
// XML Root element
$root = $xml->createElement('mp3s');
$root = $xml->appendChild($root);

// Grab a list of folders from the specified directory
if ($dir = @opendir($directoryLocation)) {
    while (false !== ($file = readdir($dir))) {
        if (is_dir($directoryLocation . DIRECTORY_SEPARATOR . $file) && $file != '.' && $file != '..') {
            // If it is a folder, put it in the folders array
            $folders[] = $file;
        }
    }

Link to comment
https://forums.phpfreaks.com/topic/224412-cant-open-a-folder/
Share on other sites

I have got a bit more detail on the error reported:

Warning: opendir() [function.opendir]: URL file-access is disabled in the server configuration in /data01/name/public_html/templates/namemp3s/MP3List.php on line 16

 

Warning: opendir(http://www.bluezoo.org.uk/templates/bluezoo/mp3s) [function.opendir]: failed to open dir: no suitable wrapper could be found in /data01/name/public_html/templates/name/mp3s/MP3List.php on line 16

 

 

Link to comment
https://forums.phpfreaks.com/topic/224412-cant-open-a-folder/#findComment-1159290
Share on other sites

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.