Joomla!, Wordpress tips for building your site

Joomla!, Wordpress tips for building your site

Syndicate this site using RSS

global variables can not handle runPHP

Published on| November 29th, 2009 | No Comment.

runPHP seems to handle global variables.
runPHP usage in the pages that have a global scope does not work.
Have not read in detail, I like that.

Try code 1
<?php
$aaa = 'test';
function displayAAA()
{
	global $aaa;
	echo $aaa;
}
displayAAA();
?>

Please try to see the above code to embed in the article.
Not display the marvelous.( :( )

Of course, the above code and save the file php, WEB from direct, php files would start,
test
Makes it appears.

Try code 2
<?php
function displayAAA()
{
	$aaa = 'test';
	echo $aaa;
}
displayAAA();
?>

Please try to see the above code to embed in the article.
But of course, the dazzling display.( :( )

To find it, I took a hell of time.( ^^; )
exec php?I was also in the other plug-ins, this behavior does not change.
The first written usage as well "eval () function is limited."Rashii?Is.

Should not use global've been stupid of me to rely on.(Serious soul-searching.)


Add to your favorites(bookmarks): はてなブックマークへ追加するdel.icio.usLivedoor ClipYahoo!FC2Nifty ClipPOOKMARK. AirlinesBuzzurl(バザール)Choixnewsing

Trackback URL

After Admin approves this comment, it will be shown.


Comments

Leave a Reply





*