PHP的session_start()和require_once起冲突了怎么处理

WBOY
Release: 2016-06-13 12:41:24
Original
845 people have browsed it

PHP的session_start()和require_once起冲突了怎么办?
我是在百度的BAE平台上调试的。。想用BCMS-SDK出个mail效果。。
目前出现了一个问题:
session_start();和require_once ( "Bcms.class.php" ) ;两个语句,不管哪个,只要写在前面,就能运行过去,随后就在后者处卡死。
比如
echo "01";
$accessKey = '';
$secretKey = '';
$queueName = '';
$host = 'bcms.api.duapp.com';
echo "2";
require_once ( "Bcms.class.php" ) ;
echo "4";
session_start();
echo "3";
输出0124,程序在session_start处挂了,

echo "01";
session_start();
$accessKey = '';
$secretKey = '';
$queueName = '';
$host = 'bcms.api.duapp.com';
echo "2";
require_once ( "Bcms.class.php" ) ;
echo "4";
输出012,程序在require_once处挂了。
更但是,如果我像下面这么写:
require_once ( "Bcms.class.php" ) ;
session_start();
echo "01";
代码没报错,但打开页面的时候,会提示500错误,服务器直接给挂了。。
为什么,怎么解决?

PHP session Baidu?App?Engine require require_once
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!