Undefined index: c 参数报错

浏览:1209 发布日期:2015/12/10 分类:求助交流
我通过以下代码接收参数信息时,只有p和m是有值的,但c是没有值,想请高手解答一下。<?php
namespace Home\Controller;
use Think\Controller;

class TestController extends Controller {
    public function GetInfo(){
        $c = $_GET['c'];
        $p = $_GET['p'];
        $m = $_GET['m'];
        echo "c=".$c.";p=".$p.";m=".$m;
    }
}
错误日志:[ 2015-12-10T17:03:22+08:00 ] ::1 /home/test/getinfo/c/123123/p/12/m/123.html
INFO: [ app_init ] --START--
INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000068s ]
INFO: [ app_init ] --END-- [ RunTime:0.000830s ]
INFO: [ app_begin ] --START--
INFO: Run Behavior\ReadHtmlCacheBehavior [ RunTime:0.000839s ]
INFO: [ app_begin ] --END-- [ RunTime:0.001076s ]
NOTIC: [8] Undefined index: c D:\wamp\www\Home\Controller\TestController.class.php 第 7 行.
INFO: [ app_end ] --START--
INFO: Run Behavior\ShowPageTraceBehavior [ RunTime:0.000734s ]
INFO: [ app_end ] --END-- [ RunTime:0.000941s ]
最佳答案
评论( 相关
后面还有条评论,点击查看>>