問題描述
我準備好的語句在帶有 PHP 5.4 的 MAMP 中工作得很好,無需調整 php.ini.在我的 GoDaddy 網站上,相同的代碼失敗:
My prepared statements work just fine in MAMP with PHP 5.4 and no need to tweak php.ini. On my GoDaddy site, the same code fails with:
致命錯誤:調用未定義的函數mysqli_stmt_get_result().
Fatal error: Call to undefined function mysqli_stmt_get_result().
我的 GoDaddy info.php 顯示以下內容已啟用:
My GoDaddy info.php shows the following as enabled:
mysqli 客戶端 API 庫版本 5.5.45
mysqli Client API library version 5.5.45
mysqlnd:mysqlnd 5.0.10
加載的插件:mysqlnd,example,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password
API 擴展:無
mysqlnd: mysqlnd 5.0.10
Loadedplugins:mysqlnd,example,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password
API Extensions: none
GoDaddy 說他們的 PHP 工作得很好,雖然我懷疑他們測試過這個功能.他們聲稱這一定是代碼錯誤,這讓我覺得與錯誤的性質和代碼在 MAMP 中工作的事實不一致.
GoDaddy says their PHP is working just fine, although I doubt they tested for this function. They claim it must be a code error, which strikes me as inconsistent with both, the nature of the error and the fact the code works in MAMP.
我的下一步是什么?
推薦答案
在 php 擴展中啟用 nd_mysqli 并禁用 mysqli
Enable nd_mysqli in php extensions and disable mysqli
這篇關于沒有 mysqli_stmt_get_result() 和 mysqlnd的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!