Jump to content

maxelcat

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Everything posted by maxelcat

  1. Many thanks for your tip - working now!
  2. 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
  3. 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; } }
  4. Dear A-M Just want to thank you for a really, really helpful post - the white list explantion was great too! I will have to make sure that my local and live server setups mirror wrt their file structures, and then I'll easily be able to impliment what you have suggested thanks again
  5. Thanks for the replies and - I think I understand! Since I am running on a shared server, and was hacked abot 6 months ago (very painful!) I think I will stick to the "Do it by hand method".
  6. Hi I run versions of sites on a local server. For these the path to a mysql connection script is pretty simple: mysql_connec.php On my live server, I put things out of the public directory - so this time the path is ../mysql_connect.php I therefore have to have sections like this in my files = and whilst not complex, its a pain having to uncomment/comment lines depending on which server I am working because I keep forgetting! // require_once('../../workRecord/mysql_connect.php'); //online require_once('mysql_connect.php'); //local Is there some way I can identify which server I am on so I don't keep having to do this. I was thinking of using something like this: if ($_SERVER['DOCUMENT_ROOT']=="c:/web_root/blah/blah"){ require_once('mysql_connect.php'); }else{ require_once('../../workRecord/mysql_connect.php'); } I am pretty sure this would work, but does this method present any security issues???
×
×
  • 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.