PHP問題 —— The use statement with non-compound name

1.1  The use statement with non-compound name

1.1.1  現象

調試程序,發現運行以下代碼程序就跑飛了:php

require_once __DIR__ . '/actions/' . $refectClass . '.php';api

1.1.2  緣由

由於是在PHPStorm中調試,一開始查看__DIR__變量,發現其一直爲xdebug,遂覺得是這個問題,網上查找不少資料均沒有解決方案。ide

後來查看錯誤日誌,發現有以下錯誤信息:ui

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)spa

 

打開BookEditAction.php文件,查看第9行代碼,發現是:debug

use CommonUtils調試

網上查找資料,發現這樣的use用法語法錯誤。日誌

1.1.3  解決

諮詢相關開發人員,此代碼爲垃圾代碼,忘記刪除,將其刪除後就行了。component

相關文章
相關標籤/搜索