-
The Great euh eh you know
hai
i seem to have a problem loading xml
I am trying to use php to collect the data from the datebase and send it as xml to flash
The php file/code works. I checked.
But nothing appears on screen
when using a "menu.xml"-file the xmldata comes shows. but not when using menu.php
So what's wrong ?
<pre>
db_array = new Array();
xmlmenu = new XML();
xmlmenu.onLoad = make_db;
xmlmenu.load("menu.php");
</pre>
Paul
-
The Great euh eh you know
eh my mistake
Oeps sorry,
I made a mistake in the .php file
So , for those having similar problems
XML is very precise:
I forgot the first return before menusystem
I works fine now
<code>
echo '<?xml version="1.0" encoding="iso-8859-1"?>';
echo '<!DOCTYPE menusystem SYSTEM "xmlmenu.dtd">';
echo "\n<menusystem>\n";
//getting menudata from db:
for ($i=0;$i<=count($menu);$i++)
{
echo "<menu>\n";
echo " <id>".$menu[$i]["id"]."</id>\n";
echo " <parent>".$menu[$i]["parent"]."</parent>\n";
echo " <naam>".$menu[$i]["naam"]."</naam>\n";
echo " <sjabloon>".$menu[$i]["sjabloon"]."</sjabloon>\n";
echo "</menu>\n";
}
echo " </menusystem>";
?>
</code>
[Edited by paul67 on 06-15-2001 at 06:49 AM]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|