-
Hey everyone!
I am trying to play with php and I am having this problem.
I have a simple php script print out a string(in the browser this works
great). But when I do :
loadVariables("test.php",this);
all i get in testing is the actual script (ie $link =
"@mysql_connect(\"localhost\");\r\n\tif(!$link){\r \n\t\tprint(\"Fukd
again!\");\r\n\t}else{\r\n\t\tprint(\"Success\") ;\r\n\t};\r\n\r\n\r\n?>")
the php script doesn't get run....
Like I said before if I try it in the browser it works ---> I get: "Success"
What's going on?
Thanks
-
Moderator
Moved to Scripting & Backend !!
-
Hi,
you are probably running this **** on a computer with windows, and you are using the flash app for testing. It is loading - technically speaking - from a file:/ url, und so your php in the same folder is loaded through a file:/ url as well.
View your movie in the browser and specify a http://localhost addy to make it work
Musicman
-
Still problems...
Ok, here is what I have tried thus far.
I tried ---> http://localhost/testing.swf // no result
I tried ---> changing the swf path in the plugin code on the php page from :<EMBED src="testing.swf" to--> <EMBED src="http://localhost/testing.swf" // no result
I tried actually uploading the pages off my machine to the web server with the same results... ( I know PHP is running there, FOR SURE. and I am also sure that it is running on my machine here locally as well!)
ANy more suggestions???
thanks SUM
-
More info on my problem..
I modified the PHP script to this:
//----------------------------------------------
<?
//connect to DB
$link=@mysql_connect("localhost");
if(!$link){
$result="Still Bad!";
print("&textOut=".urlencode($result));
}else{
$result="Success";
print("&textOut=".urlencode($result));
};
?>
//-----------------------------------------------
and in the fla I have:
loadVariables("test.php",this)
inputField.text=_root.textOut
(locally I figured this would work without an onLoad event, am I right?)
-
GOT IT!!!!!
got it... I didn't understand what you meant about the path.... got it now though .. thanks!!!
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
|