开发者

PHP 'stops' (is empty) after session_start();

I have a problem using the php method session_start();

<?php
if ($_SERVER['REQUEST_METHOD'] == 'P开发者_如何学编程OST') 
{
    session_start();
    echo "Sesstion Started";
}

This is at the very beginning auf the php-file. If I execute this on my webserver and the requested method is POST, the page stays empty and it seems as if nothing is executed after the session_start();

Does anyone have an idea why this happens?

Cheers, Cheeesi


If it were me running into this issue I would simply do this;

<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') 
{
    session_start();
    echo "Sesstion Started";
}
else
{
    echo "Error : Session NOT Started";
}
?>

This would help with the "empty" output until you can track down the error reporting.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜