开发者社区 问答 正文

PHP网站在win7下运行错误

screenshot
PHP网站在win7下运行错误

展开
收起
杨冬芳 2016-07-15 15:47:00 1772 分享 版权
1 条回答
写回答
取消 提交回答
  • IT从业

    参考PHP Notice: undefined index 完美解决方法

    定义一个函数:

    function _get($str){
        $val = !empty($_GET[$str]) ? $_GET[$str] : null;
        return $val;
    }

    然后在用的时候,直接用 _get('str') 代替 $_GET['str'] 就行啦~

    2019-07-17 19:57:07
    赞同 展开评论
问答分类:
PHP
问答地址: