|
您好: 在練習第15章網路留言版,執行 post.php 送出留言後,php_error_log 中出現以下訊息:
[13-May-2020 11:54:39 Europe/Berlin] PHP Notice: Only variables should be passed by reference in C:\xampp709\htdocs\sunjtech_sublime\phpboard\post.php on line 31 [13-May-2020 11:54:39 Europe/Berlin] PHP Notice: Only variables should be passed by reference in C:\xampp709\htdocs\sunjtech_sublime\phpboard\post.php on line 32 [13-May-2020 11:54:39 Europe/Berlin] PHP Notice: Only variables should be passed by reference in C:\xampp709\htdocs\sunjtech_sublime\phpboard\post.php on line 33 [13-May-2020 11:54:39 Europe/Berlin] PHP Notice: Only variables should be passed by reference in C:\xampp709\htdocs\sunjtech_sublime\phpboard\post.php on line 34 [13-May-2020 11:54:39 Europe/Berlin] PHP Notice: Only variables should be passed by reference in C:\xampp709\htdocs\sunjtech_sublime\phpboard\post.php on line 35 [13-May-2020 11:54:39 Europe/Berlin] PHP Notice: Only variables should be passed by reference in C:\xampp709\htdocs\sunjtech_sublime\phpboard\post.php on line 36
查看程式碼,第 31 ~ 36 行如下:
$stmt -> bind_param("ssssss", GetSQLValueString($_POST["boardname"], "string"), GetSQLValueString($_POST["boardsex"], "string"), GetSQLValueString($_POST["boardsubject"], "string"), GetSQLValueString($_POST["boardmail"], "email"), GetSQLValueString($_POST["boardweb"], "url"), GetSQLValueString($_POST["boardcontent"], "string"));
想請問這該如何解決?感謝您。 |