新しいラップトップを入手し、新しいバージョンの XAMPP をインストールしました。作業中のシステムを移動しましたが、このコンピューターでは正しく機能していません。
私が認識した最初の問題は、それを含むファイルに関連する場所からのファイルが含まれていないことでした。私のconfig.php
ファイルだけでなく、includes/
ディレクトリにもファイルがありinclude.php
ます。が と同じフォルダにあるにもかかわらず、include.php
ファイルに入力する必要があります。私の他のコンピューターでは、.require 'includes/config.php';
config.php
include.php
require 'config.php';
また、インクルードされたファイルが表示しているメイン ファイルで読み込まれなかったため、変数と定数が定義されていないため、自動定義されているように見えますか?
Notice: Use of undefined constant DB_HOST - assumed 'DB_HOST' in C:\xampp\htdocs\Xion\includes\include.php on line 6
これは、新しいバージョンの PHP の構成に問題がありますか?