为什么我一直收到致命错误:调用未定义的函数password_hash()?

时间:2015-03-18 10:57:20

标签: php sql

我的代码是:

function NewUser() 
{ 


    $fullname = $_POST['name'];
    $userName = $_POST['user'];
    $email = $_POST['email'];   
    $password = password_hash($_POST['pass']);
    $password_hash = password_hash($password, PASSWORD_BCRYPT);      

    #$password = stripslashes($password); 
    #$password = mysql_real_escape_string($password);

    $query = "INSERT INTO `WebsiteUsers`(`fullname`, `userName`, `email`, `pass`)   VALUES ('$fullname','$userName','$email','$password')"; 
    $data = mysql_query ($query)or die(mysql_error()); 


    if($data) 
    { 
    echo "YOUR REGISTRATION IS COMPLETED..."; 
    } 
}

我不断得到的错误是:

  

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

0 个答案:

没有答案