<span><span>$output</span><span>= </span><span>array</span><span>(); </span><span>$a </span><span>= @</span><span>$_GET</span><span>[</span><span>'useid'</span><span>] ? </span><span>$_GET</span><span>[</span><span>'useid'</span><span>] : </span><span>''</span><span>; </span><span><em>//$uid = @$_GET['uid'] ? $_GET['uid'] : 0; </em></span><span><em></em></span><span>if </span><span>(</span><span>empty</span><span>(</span><span>$a</span><span>)) { </span><span><em>// $output = array('data'=>NULL, 'info'=>'ios!', 'code'=>-201); </em></span><span><em></em></span><span>$output</span><span>= </span><span>array</span><span>(</span><span>'hahah'</span><span>=></span><span>'hello'</span><span>, </span><span>'requestDic'</span><span>=></span><span>'hello'</span><span>,</span><span>'hello'</span><span>=></span><span>array</span><span>(</span><span>'image'</span><span>=></span><span>'www.baidu.com'</span><span>,</span><span>'imageurl'</span><span>=></span><span>'www.baidu.com'</span><span>)); </span><span>exit</span><span>(json_encode(</span><span>$output</span><span>)); </span><span> }</span><span>elseif</span><span>(!</span><span>empty</span><span>(</span><span>$a</span><span>)){ </span><span>$output</span><span>= </span><span>array</span><span>(</span><span>'hahah'</span><span>=></span><span>'hello'</span><span>, </span><span>'requestDic'</span><span>=></span><span>'hello'</span><span>,</span><span>'hello'</span><span>=></span><span>array</span><span>(</span><span>'image'</span><span>=></span><span>'www.sina.com'</span><span>,</span><span>'imageurl'</span><span>=></span><span>'www.sina.com'</span><span>)); </span><span>exit</span><span>(json_encode(</span><span>$output</span><span>)); </span><span> };</span></span>
The above introduces PHP's simple web get request processing, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.