オブジェクトが呼び出されたにもかかわらず、「page.class.phpの35行目の非オブジェクトに対するメンバー関数process_data()の呼び出し」が表示されます。
これは、インスタンス化されているオブジェクトを示すindex.php抽出です。
// require our common files
require("modules/module.php");
require("registry/objects/datetime.class.php");
require("registry/objects/page.class.php");
// load in all the objects
$datetime = new dateandtime;
$page = new page;
$module = new module;
次に、Processクラスに渡されます
require("template.class.php");
$template = new template($php_path . "controllers/themes/adm/" . $page . ".html");
// Place in both commonly used language and page specific language
$template->language($php_path . "controllers/language/en/adm/common.php");
$template->language($php_path . "controllers/language/en/adm/" . $page . ".php");
// Tell the page's module to load in data it needs
$module->process_data("module_" . $page);
// Output the final result
$template->output();
この時点で、PHPはエラーをスローしています。module.phpファイルの内容は次のとおりです。
class module {
public function process_data ($child) {
require($child . ".php");
read_data();
return true;
}
}
インスタンス宣言を2番目に貼り付けたコード内に移動しようとしましたが、「モジュール」が呼び出すクラスが「テンプレート」クラスの一部も使用するため、エラーがさらに発生します。同じ問題がさらに下で発生します。この線。
私が彼女を間違えている、または完全に行方不明になっているのは、後者だと確信していますが、ここで本当に助けが必要です。ありがとう