wshq 发表于 2018-12-16 14:56:26

PHP问题 —— The use statement with non

1.1The 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:: 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解决
  咨询相关开发人员,此代码为垃圾代码,忘记删除,将其删除后就好了。



页: [1]
查看完整版本: PHP问题 —— The use statement with non