1
I'm sorry if this has been answered elsewhere, but I haven't found it.
I'm trying to use php script includes in custom blocks and running into trouble with global variables. The scripts that I am using work fine when run on their own but when included in a custom block, the globals seem to disappear.
For example:
Including a php file with the following code in it
----
$text = 'Hello World';
echo $text;
----
Will produce the output 'Hello World'.
And including a php file with the following code
----
$text = 'Hello World';
function display() {
global $text;
echo $text;
}
display();
----
Produces no output.
Both scripts run outside the XOOPS environment produce the output 'Hello World'.
Thanks in advance for any help.
---------------------------------
- Blue Skies and Stay Vertical! -
---------------------------------