Jump to content

erikjauli

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Everything posted by erikjauli

  1. Thanks for the suggestion, for some reason that command wasn't working. I was however able to get it to work by using this: foreach ($dir as $file) { if ($dir->isDot()) {continue;} if (strripos($file,".jpg")==true) { That solved the problem by only including .jpg's in the xml which is exactly what im looking for. Thanks again. -Erik
  2. the .DS_Store file is a pretty common file on a mac, however it's a "hidden" file. i was under the impression that it was a necessary file that exists within folders so I was hesitant to manually delete it. From what ive researched its not vital and I should be able to manually delete it through terminal. I'll give that a try in the morning and see what happens
  3. i am currently building/managing/hosting the site locally on a mac using mamp. maybe once i migrate the site to an external host this issue will be resolved. curious if anyone else has experienced this problem before and how they've resolved it. thanks -Erik
  4. Hi... I'm very new to PHP and thanks to help on this forum I was able to build a dynamic image rotator using actionscript, xml, and php today. I have an swf with actionscript that calls a php file to generate an xml of a directories contents. The swf then creates a random slideshow based on that xml. The only problem I'm having is that the php script I am using includes ".DS_Store" in the generated XML. I think that is causing problems with the slideshow because it randomly stops when it should loop continuously. Im assuming when it tries to grab the .ds store file its causing this problem. Ive attached the php file, the model XML, and the generated xml. Any ideas? Thanks. [attachment deleted by admin]
  5. got it working... just need to change it from "test/fotos" to just "fotos". exciting....been trying this for two days now, haha. Thanks again.
  6. yes... yeah i know I'm getting a little ahead of myself, but I'm slowly learning. For the other file I now recreated a proper php file using code view. Almost have it working. Now when I call that file from localhost I get this message: ------------------------------------------- fromvega XML Generator 2 - fromvega.com --------------------------------------------- Creating XML file for 'test/fotos'... Couldn't open the directory 'test/fotos'. Done! I'm assuming i need to experiment with this variable of the code until I get it working properly: // list of directories to be read with no trailing slash $directoryList = array('test/fotos'); Thanks again for your help, I really appreciate it. -Erik
  7. ok fixed that, called it from the local host and now i just see "hellow i am working". So I guess its not an issue with the way my server is set up.
  8. thanks for your help / patience. Just to make sure I did everything correctly I'll explain exactly how I did this simple test. I opened dreamweaver, created a new PHP document and pasted the code you provided into the document. Here's what the code inspector in dreamweaver says: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Untitled Document</title> </head> <body> <?php<br /> echo 'hello I am working.';<br /> ?> </body> </html> I save this file as index.php and call it from the localhost. If I ran that test correctly... then it seems like my server is not setup correctly. If that's the case, is that something i need to do within MAMP? -Erik
  9. the file I downloaded from the tutorial had the extension ".phps". The local host seems to be working normally. If i go to http://localhost/test, then my index.html page loads properly. As I said i am very new to php, so I'm not sure exactly what you mean by "can access index.php and parses it correctly?".
  10. Hi... I'm extremely new to php and am having some trouble getting a php script to function. I've built a basic flash slideshow using actionscript and xml. I'm now trying to figure out how to use php to dynamically re-create this xml by reading the contents of a directory. I was able to find a php script that is supposed to do this here: http://fromvega.com/wordpress/2007/05/13/xml-generator-dir/ I'm having a hard time getting the script to run, and I'm not sure what I'm doing wrong. I am using MAMP to manage/test my site locally. I go to: http://localhost/test/xmlgen.phps and i get this message : Not Found The requested URL /test/xmlgen.phps was not found on this server. Apache/2.0.59 (Unix) PHP/5.2.6 DAV/2 Server at localhost Port 80 If I change the filename to xmlgen.php and then go to : http://localhost/test/xmlgen.php ... i just see the code as plain text. The only aspects of the code ive changed are these 3 variables: // list of directories to be read with no trailing slash $directoryList = array('test/fotos'); // name of the XML file $xmlFileName = 'library.xml'; // name of the XML model $xmlModelName = 'model.xml'; Anyone have any idea what I'm missing here? Any help would be appreciated, thanks. -Erik
×
×
  • 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.