日期:2014-05-17 浏览次数:20667 次
return array( 'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..', ...... // autoloading model and component classes 'import'=>array( 'application.models.*', 'application.components.*', 'application.helpers.*', // helper methods 'ext.mail.Message', 'application.lib.*', ), )
//引入PHPExcel相关文件 require_once 'PHPExcel.php'; require_once 'PHPExcel/IOFactory.php'; require_once 'PHPExcel/Writer/Excel2007.php'; require_once 'PHPExcel/Writer/Excel5.php';
<?php include_once "/ckeditor/ckeditor.php"; // Create a class instance. $CKEditor = new CKEditor(); // Path to the CKEditor directory. $CKEditor->basePath = Yii::app()->baseUrl.'/ckeditor/'; // Replace a textarea element with an id (or name) of "textarea_id". $CKEditor->replace("News_content"); ?>
require_once(dirname(__FILE__)."/../components/RMSClient.php"); //注意以下方式引入,提升找不到 require_once(Yii::app()->baseUrl . "/protected/components/RMSClient.php"); //原因:include、require包含的是服务器上的文件路劲,和url没有直接关系。 //如果想用yii::app()方式,可以使用../config/main.php中的Yii::app()->basePath.