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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.