PHP session_start () conflicts with require_once. what should I do? I debugged it on Baidu's BAE platform .. You want to use a BCMS-SDK to get a mail effect .. At present, there is a problem: session_start (); and require_once & nbsp; (& nbsp; "Bcms. linoleic PHP's session_start () conflicts with require_once. what should I do?
I debugged it on Baidu's BAE platform .. You want to use a BCMS-SDK to get a mail effect ..
There is currently a problem:
Session_start (); and require_once ("Bcms. class. php"); two statements, no matter which one is written in front of the statement, can run in the past, and then stuck in the latter.
For example
Echo "01 ";
$ AccessKey = '';
$ SecretKey = '';
$ QueueName = '';
$ Host = 'bcms .api.duapp.com ';
Echo "2 ";
Require_once ("Bcms. class. php ");
Echo "4 ";
Session_start ();
Echo "3 ";
The output is 0124, and the program hangs at session_start,
However
Echo "01 ";
Session_start ();
$ AccessKey = '';
$ SecretKey = '';
$ QueueName = '';
$ Host = 'bcms .api.duapp.com ';
Echo "2 ";
Require_once ("Bcms. class. php ");
Echo "4 ";
Output 012. The program is suspended at require_once.
More importantly, if I write as follows:
Require_once ("Bcms. class. php ");
Session_start ();
Echo "01 ";
The code does not report an error, but when you open the page, the error 500 will be displayed, and the server will directly fail ..
Why? PHP session Baidu? App? Engine require require_once shared:
------ Solution --------------------
Session_start (); no output is available. As for the 500 error you mentioned, you can enable the php error prompt to know what went wrong.
------ Solution --------------------
MorePrevious code violations: there are echo in front of session_start ()... errors will naturally occur.
You can use ob_start (); at the beginning of the program to avoid
For
MoreYou must at least debug the code locally.
If there is no local environment, first check whether the file name Bcms. class. php is written correctly, especially in case, and check whether the file exists.
If there is no problem, paste his code
------ Solution --------------------
Equire_once ("Bcms. class. php ");
Session_start ();
Echo "01 ";
No output exists before session_start.
------ Solution --------------------
In
Echo "2 ";
Var_dump (file_exists ('bcms. class. php '));
You have to explain what has been done in Bcms. class. php?