Yii implementation of automatic loading of class map method, YII implementation load map
In this paper, the method of implementing the automatic loading class map of Yii is described. Share to everyone for your reference. Specific as follows:
Yii inherits a static property $classmap, which can be used for Yii's automatic load class map. The keys in the array are the class names, and the values in the array are the paths to the corresponding class files.
Require_once ($yii); $app = Yii::createwebapplication ($config); Yii:: $classMap = Array ( ' jphpmailer ' = = Yii::getpathofalias (' ext '). ' /phpmailer/jphpmailer.php ',); $app->run ();//You can no longer use Yii::import () to introduce files. $mailer = new Jphpmailer ();
It is hoped that this article is helpful to the PHP program design based on YII framework.
http://www.bkjia.com/PHPjc/977788.html www.bkjia.com true http://www.bkjia.com/PHPjc/977788.html techarticle YII Implementation of automatic loading of class map method, YII implementation load Map The example of YII implementation of automatic loading of class map is described in this paper. Share to everyone for your reference. Specific as follows: Yii following ...