BUG继承类
1.簡(jiǎn)述
子類(lèi)繼承父類(lèi)后不能直接使用父類(lèi)use的類(lèi)!!!!
如果在子類(lèi)中還要再使用? 應(yīng)該再次use下!!!!!
2.代碼
<?php namespace app\modules\weixin\controllers;use Yii; use yii\log\FileTarget; use app\common\components\BaseWebController;class MsgController extends BaseWebController {public function actionIndex(){if (!$this->checkSignature()) {return "error signature";}if (array_key_exists("echostr",$_GET) && $_GET['echostr'] ) {return $_GET['echostr'];}$xml_data = file_get_contents("php://input");$this->record_log( "[xml_data]:". $xml_data );if (!$xml_data){return "error";}else{}}3.分析
父類(lèi)中有了use Yii;
在子類(lèi)中還需要再次使用use Yii;
!!!!
總結(jié)
- 上一篇: PHP的simplexml_load_f
- 下一篇: JS定义属性及方法