Alvaro Cobo
|
Posted: 07/15/2011, 6:10 PM |
|
Hi guys:
I have included a custom php (included.php) page into a label of a CCS
page (css.php) using custom code. The custom php page uses some
functions that are located in a separate file (functions.php).
The problem is that in included.php page there is a reference to a
SESSION variable, but is not recognized in the css.php page, I have
tested and the scripts in the included.php file work fine wheh are not
included in the CCS file.
An additional clue is that the $_SESSION varaible is used in the
function.php file.
I guess that I need to use CCStudio CCGetSession function, to gather
this data into a variable, but I have no idea how to do it into a
external file.
Custom Code for before Show of Label1
$servername="http://" . $_SERVER['SERVER_NAME'] .
dirname($_SERVER['PHP_SELF']);
$included_page=$servername."/script_export_data.php";
$output = implode("", file($included_page));
$Label1->SetValue($output);
Any clue will be highly appreciated.
Thanks,
Alvaro
|
|
|
datadoit
|
Posted: 07/16/2011, 9:13 AM |
|
Alvaro, what's happening is that by calling the external page via a
function such as implode(), the system is making a call to the web page,
which creates a session for the script (or as root user).
Thus, the current user's session knows nothing about that other session.
You'll likely want to manage the variables via the URL.
|
|
|
Alvaro Cobo
|
Posted: 07/18/2011, 12:20 PM |
|
On 16/07/11 11:13, datadoit wrote:
> Alvaro, what's happening is that by calling the external page via a
> function such as implode(), the system is making a call to the web page,
> which creates a session for the script (or as root user).
>
> Thus, the current user's session knows nothing about that other session.
> You'll likely want to manage the variables via the URL.
Many Thanks Datadoit. I will try and let the list know how it worked.
Regards.
Alvaro
|
|
|
|