如果你看看它明確定義和公開的代碼。爲什麼我會遇到致命錯誤:調用未定義的函數prep_connections()?
<?php
class Config {
public function prep_connections($collection){
}
public function get_connctions(){
require_once('readfile.php');
$reader = new Readfile();
$collections = json_decode($reader->read("../../config/database.cfg"));
foreach($collections as $collection){
prep_connections($collection);
}
}
}
$config = new Config();
$connections = $config->get_connctions();
有一個在你發佈的鏈接沒有代碼。 – 2012-07-30 14:01:59
您可以始終手動縮進代碼 - 只需確保發佈相關代碼而不是小說。 – Matt 2012-07-30 14:04:59