码迷,mamicode.com
首页 > Web开发 > 详细

PHP问题 —— The use statement with non-compound name

时间:2016-05-13 15:26:06      阅读:1634      评论:0      收藏:0      [点我收藏+]

标签:php   php问题   

1.1  The use statement with non-compound name

1.1.1  现象

调试程序,发现运行如下代码程序就跑飞了:

require_once __DIR__ . ‘/actions/‘ . $refectClass . ‘.php‘;

1.1.2  原因

因为是在PHPStorm中调试,一开始查看__DIR__变量,发现其一直为xdebug,遂以为是这个问题,网上查找很多资料均没有解决方案。

后来查看错误日志,发现有如下错误信息:

2014-05-12 16:41:53: <E> [php                 ]: The use statement with non-compound name ‘CommonUtils‘ has no effect (D:\ProjectWork\SourceCode\Server\i2goods\protected\components\clientapi\actions\BookEditAction.php:9)

 

打开BookEditAction.php文件,查看第9行代码,发现是:

use CommonUtils

网上查找资料,发现这样的use用法语法错误。

1.1.3  解决

咨询相关开发人员,此代码为垃圾代码,忘记删除,将其删除后就好了。

本文出自 “rainman” 博客,请务必保留此出处http://lancelot.blog.51cto.com/393579/1772964

PHP问题 —— The use statement with non-compound name

标签:php   php问题   

原文地址:http://lancelot.blog.51cto.com/393579/1772964

(2)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!