-
Flash doesn't parse PHP
Hi guys,
The weirdest thing keeps on happening. I've tried various things but nothings seems to help. I've got a php script that should return a variable to flash. In short:
PHP Code:
<?php
require "functions.inc.php";
require "config.inc.php";
$i = 1;
$files = CC_readDir($dir_commissions);
echo "&img=".$files[$i-1]."&";
?>
When I run it in a browser it returns:
&img=CIMG0778.JPG&
When I run the swf it returns:
".$files[$i-1]."
Looks like flash doesn't parse the php... What am I doing wrong?
Thanx for the help!
Cheers,
Gekke_Hollander
-
Hi,
any chance that "run the swf" means opening an swf file on your harddisk as a file, with the php file in the same folder?
Try opening the swf file in browser (with a http url) in that case
Musicman
-
true!
Musicman,
Thanx for the reply! Yep that was the deal, what I did is change the loadvars "file.php" to "http://localhost/file.php" and it worked. Later on I changed it back to "file.php" and tested it from my localhost instead of my HD and it still worked.
Weird characteristic but kinda understandable. If it's not run from http it's not parsed. But also weird that it still checks the whole php file in search of a possible variable and returns it (unparsed).
Oh well...
Cheers,
Gekke_Hollander