<?php
/**
* This class is sort of factory class that is responsible for loading
* classes, it check if this class is not defined then it includes the file
* So developer don't need to worry about including that file
* @author Haafiz
*/
class load{
public static $app_path= APP_PATH;
public static $model_path=MODEL_PATH;
/*
* @param string $model_name <>Name of class(model) that is required to instantiate/load</p>
* @param bool $continue_on_error this decide whether to have fatal error or continue on error loading
* $return object
*/
public static function model($model_name,$conitnue_on_error=0){
if(!class_exists($model_name)){
$model_filename= strtolower($model_name).".php";
try{
include self::$model_path.$model_filename;
}
catch(Exception $e){
if(!$continue_on_error){
die($e);
}
}
$model=new $model_name();
return $model;
}
}
}
?>
В приведенном выше коде приходится сталкиваться со следующей ошибкой. Некоторые люди говорят в некоторых других темах, что проблема заключается в использовании &
, я не использую это. Так в чем собственно проблема в моем случае? Все, кажется, делает все правильно. Видел другие темы, но решения не нашел. Поэтому, пожалуйста, если другие люди что-то понимают под этим. Благодарность
D:\xampp\php\PEAR\Config.php on line 80
. И очень вероятно, что там используется&
- person Nanne   schedule 03.05.2012Config.php
... Где вся конфигурация? - person animuson   schedule 03.05.2012