PHP MySQLI 调用未定义的方法 mysqli_stmt::bind_params()

PHP MySQLI Call to undefined method mysqli_stmt::bind_params()

我的一个朋友目前不在身边,在这个脚本上提供了大量帮助我目前正在更新我的旧脚本,但是它显示了以下错误消息;

Fatal error: Call to undefined method mysqli_stmt::bind_params()

    $stmt = $db->prepare( $sql ); 
    if (!$stmt) 
    { 
        die("Failed to prepare statement: " . $sql); 
    } 

    // here I only get the title, website, and summary from the <form> 
    // that posted to this page: 
    $title = $_POST["news_title"]; 
    $img  = $_POST["news_imgPath"]; 
    $desc  = $_POST["news_content"];
    $more  = $_POST["news_websitePath"];

    $stmt->bind_params("ssss", $title, $img, $desc, $more ); 

    if ( ! $stmt->execute() ) 
    { 
        die("Execution of bound statement failed: " . $stmt->error); 
    } 

    echo "Inserted {$stmt->affected_rows} correctly.<hr/>"; 

    $db->close();

Fatal error: Call to undefined method mysqli_stmt::bind_params()

bind_param ,而不是 bind_params()

                         ^

你拼错了bind_param

$stmt->bind_param("ssss", $title, $img, $desc, $more );