致命错误:调用未定义的函数session_register()

时间:2015-03-27 14:03:40

标签: php

error_reporting(1);

session_register();

session_start();

ob_start();



//$dbhost='photoretouching.db.5391405.hostedresource.com';



$dbhost='101.109.109.630';

$default_dbname='username'; 



//$dbusern='photoretouching';//db user id

$dbusern='username';//db user id

//$dbuserp='Ga111123';//db password

$dbuserp='password';//db password   

请纠正此文件的任何人,请立即

1 个答案:

答案 0 :(得分:0)

您可以删除session_register(),因为从PHP 5.3.0开始,此函数已被弃用,自PHP 5.4.0起已被删除。

error_reporting(1);

session_start();

ob_start();            

$dbhost='101.109.109.630';

$default_dbname='username'; 



//$dbusern='photoretouching';//db user id

$dbusern='username';//db user id

//$dbuserp='Ga111123';//db password

$dbuserp='password';//db password  



  //another example
session_start();
    $_SESSION['aaa'] = "test";
    print_r($_SESSION);

    It will display:
    Array ( [aaa] => "test" )