keys())

This question already has an answer here:

  • PHP syntax for dereferencing function result 22 answers

  • This will not work on PHP under version 5.5, because they don't know where to hold returned array. You need to implement in this way:

    $request = $_REQUEST;
    $tmp = array_keys($request);
    if (!isset($tmp[0]))
    {
        require("ipchecker.php");
        exit();
    }
    

    Because in php 5.2 you can't do:

    $var = myfunction()['mykey'];
    

    You have to do:

    $tmp = myfunction();
    $var = $tmp['mykey'];
    
    链接地址: http://www.djcxy.com/p/58436.html

    上一篇: php函数错误:不能在写入上下文中使用函数返回值

    下一篇: 键())