インターネット全体で提案を見て、すべてのクエリを mysqli に変換しようとしました。
しかし、私の XAMPP では mysqli が動作しません。PHPフォルダーを確認したところ、php_mysqli.dll
ファイルがあります...それでも機能しません
ロードするためにphp.iniに宣言しましたか?いいえの場合は、php.ini でこれを見つけて、php_mysqli.dll を追加してみてください。
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension=modulename.extension
;
; For example, on Windows:
;
; extension=msql.dll
;
; ... or under UNIX:
;
; extension=msql.so
;
; ... or with a path:
;
; extension=/path/to/extension/msql.so
;
; If you only provide the name of the extension, PHP will look for it in its
; default extension directory.
;
; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.
extension= php_mysqli.dll
ディレクトリphpMyAdmin
に移動し、名前が のファイルがあることconfig.inc.php
を確認し、そのファイルを開き、次のような行を見つけます
$cfg['Servers'][$i]['extension'] = 'mysql'
。
に変更mysql
するだけmysqli
です。
XAMPP 1.8.3-1、XAMPP 1.8.2-2、XAMPP 1.8.1 を使用する必要があると思います。これらの xampp バージョンはデフォルトで Mysqli もサポートしているためです。