以下のスニペットを使用して、いくつかのフォルダーからクラスを自動ロードしています。
// Check if the autoload configuration file exists
if(is_file("configuration/autoload")) {
// Extract the listed folders from the configuration file
$folders = explode("\n", file_get_contents("configuration/autoload"));
// Prepend the base path to the extracted folder paths
array_unshift($folders, get_include_path());
// Configure the folders in which to attempt class autoloading
set_include_path(implode(PATH_SEPARATOR, $folders));
// Configure the file extensions that should be autoloaded
spl_autoload_extensions(".php");
// Administer the attempt to autoload classes
spl_autoload_register();
}
いくつかのフォルダは、次のようにファイルに一覧表示されます。
core/utility
core/factory
core/modules
core/classes
core/classes/form
core/classes/form/fields
frontend
ローカルではチャームのように機能しますが、オンラインサーバーで機能させることができません(関連するすべてのファイルとフォルダーをCHMODしました)。インクルードパスの設定中に問題が発生していると思いますが、頭を包み込むことができないようです。
何か案は?
ありがとう