Topic: php driven xml - missing something blindingly obvious !?
hi
I'm trying to dynamically create my xml file through php - the page loads the script but doesn't show any images
I've simplified the php to just output a single link to tall.jpg from the example
when I run this script through the php exe from php.net it shows the script is working as expected (and I can even save this generated xml and successfully use it directly instead of the php)
- I'm obviously missing something obvious, but I've spent far too long banging my head against this, so thought I'd ask for help
here's the driving html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>bah</title>
<!-- Download SimpleViewer at www.airtightinteractive.com/simpleviewer -->
<script type="text/javascript" src="swfobject.js"></script>
<style type="text/css">
/* hide from ie on mac \*/
html {
height: 100%;
overflow: hidden;
}
#flashcontent {
height: 100%;
}
/* end hide */
body {
height: 100%;
margin: 0;
padding: 0;
background-color: #181818;
color:#ffffff;
}
</style>
</head>
<body>
<div id="flashcontent">SimpleViewer requires Macromedia Flash.<a href="http://www.macromedia.com/go/getflashplayer/">Get Macromedia Flash.</a> If you have Flash installed, <a href="index.html?detectflash=false">click to view gallery</a></div>
<script type="text/javascript">
var fo = new SWFObject("viewer.swf", "viewer", "100%", "100%", "7", "#802020");
fo.addVariable("preloaderColor", "0x800000");
fo.addVariable("xmlDataPath", "my_gallery.php");
fo.write("flashcontent");
</script>
</body>
</html>
and the php script
<?php
$out = array();
$out = '<?xml version="1.0" encoding="UTF-8"?>';
$out .= '<simpleviewerGallery';
$out .= ' maxImageWidth = "1024"';
$out .= ' maxImageHeight = "1024"';
$out .= ' textColor = "0x996633"';
$out .= ' frameColor = "0xffffff"';
$out .= ' frameWidth = "5"';
$out .= ' stagePadding = "40"';
$out .= ' thumbnailColumns = "3"';
$out .= ' thumbnailRows = "5"';
$out .= ' navPosition = "left"';
$out .= ' enableRightClickOpen = "true"';
$out .= ' backgroundImagePath = ""';
$out .= ' imagePath = "images/"';
$out .= ' thumbPath = "thumbs/"';
$out .= ' title = "blah"';
$out .= '>';
$out .= '<image>';
$out .= ' <filename>tall.jpg</filename>';
$out .= ' <caption>tall.jpg</caption>';
$out .= '</image>';
$out .= '</simpleviewerGallery>';
echo $out;
?>
thanks
Jonathan