php load function not working
-
Hi,
I’m using a code snipet that creates a spinning album of photos from a picasa web album RSS feed. Up until recently I was just using 1 album, which is really simple and straightforward. However, I thought it would be really cool to write a php script that would randomly display one album from all of a specific Picasa user’s albums.
Shouldn’t be too tricky, right?
I got this to work on my local deployment of wordpress using the following code (separate php file, randomImageGallery.php):
[Code moderated as per the Forum Rules. Please use the pastebin]
I then just used an include for this file on my index.php and had no problems whatsoever.
Here’s the kicker: I tried uploading this as a brand new theme, tried editing the old theme through the wordpress editor, tried FTPing index.php and randomImageGenerator.php to my site online. Nothing worked. I thought maybe this was because my server was set up with php 4.4.9 by default, but I just upgraded to 5.2.12 and there’s no difference. No matter what I do, nothing in my index.php file after the include line for randomImageGenerator.php shows up. Oh I also tried putting everything inline in index.php and that didn’t work either.
I tried removing the main block of php (first php tag in the code above) and the rest of my code below showed up. So I went line-by-line adding a single line of php back in at a time, and everything was fine until I hit:
$xmlDoc->load($xml);Deleting this line alone does not solve the problem, and I’m really not sure at this point what could be going wrong. Can anyone help me out? Thanks in advance!
The topic ‘php load function not working’ is closed to new replies.