我使用共享主机并且不想在我的每个共享主机帐户中安装 Yii 的核心库。
因此,我想将库放在一个共享主机中,并在我的所有帐户共享主机中使用它。
这是可以做到的还是会因此产生什么后果?
Yii 中的示例代码index.php
将是:
// change the following paths if necessary
$yii='http://gusdecool.com/Script/Yii/1.1.13/yii.php';
$config=dirname(__FILE__).'/protected/config/main.php';
// remove the following lines when in production mode
defined('YII_DEBUG') or define('YII_DEBUG',true);
// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
require_once($yii);
Yii::createWebApplication($config)->run();