I have the following situtation that I would like to make work.
I have a script in to which I include a 2nd script about half way down
the first script.
There is also a case where I want to call the 2nd script code itself
and not included in the first script.
The issue is when I call the 2nd script by itself I need to have session_start()
included as the first line in the script. I have session_start() at the top
of the first script and so it works fine, but, when I call the script by itself it
does not work and I get an error because I am trying to conditionally include
the line of code.
If have used the following conditional code:
if ($_SERVER["SCRIPT_NAME"] == "/php/fsgetinfo.php") {
session_start();
}
The error is:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/generat4/public_html/php/fsgetinfo.php:1) in /home.........
If there is a way to work around without having to make a complete 2nd copy of the 2nd script I would appreciate any help.
Kim