1

将应用程序上传到在线服务器后,我最近遇到了这个问题,我不断收到警告,例如:

YiiBase::include(CJuiInputWidget.php) [<a href='yiibase.include'>yiibase.include</a>]:       failed to open stream: No such file or directory

- 或者 -

YiiBase::include(YiiMailer.php) [<a href='yiibase.include'>yiibase.include</a>]: failed to open stream: No such file or directory

- 或者 -

YiiBase::include(CGridColumn.php) [<a href='yiibase.include'>yiibase.include</a>]: failed to open stream: No such file or directory

这里真正的问题是,所有这些页面都可以在我的本地主机或在线服务器上的其他页面上完美运行。当我隐藏警告时,一些页面正常显示而另一些页面不正常显示,我知道错误仍然存​​在。

我的本地主机规格是:XAMPP、Windows 7 操作系统、PHP 版本 5.3.8

在线服务器规格:XAMPP、Windows 7 操作系统、PHP 版本 5.2.6

我目前正在通过在 main.xml 中导入所需的小部件来解决这个问题。例如,同样疯狂的是 CGridColumn 和 CJuiInputwidget 在其他页面上运行良好,我确保考虑了区分大小写。

任何人都可以指出正确的方向或给我任何关于正在发生的事情的指示或想法,任何提示或建议都非常感谢!

这也是正在发生的事情的堆栈跟踪:

**Stack trace:
 #0 D:\...\yii\framework\YiiBase.php(395): spl_autoload_call()
 #1 D:\...\yii\framework\YiiBase.php(395): autoload()
 #2 D:\...\yii\framework\YiiBase.php(296): autoload()
 #3 D:\...\yii\framework\YiiBase.php(196): import()
 #4 D:\...\yii\framework\zii\widgets\grid\CGridView.php(363):

创建组件()**

如您所见,主要问题与自动加载有关

感谢您抽出时间来阅读,

4

2 回答 2

1

可能是在 Windows 上开发、在 Linux 上托管的常见问题。Windows 不关心文件名的大小写,Linux 关心。我会检查您编写或包含的任何小部件以及您拥有的任何自定义包定义。只要确保大小写正确。

于 2013-01-26T22:34:28.813 回答
0

好吧,我将此添加到 Index.php 以隐藏警告...在我的 POV 中非常脏

ini_set('error_reporting', E_NOTICE);

问题解决了,我仍然无法理解发生了什么!

于 2013-01-31T13:23:10.253 回答