限时免费试用:欢迎注册 api.bigmodel.org ,快速体验大模型 API 接入服务。

PHP基础

PHP 把数组中的元素添加到链接中,形成新的链接

形成的链接: http://localhost/index/cate/listt?id=123&name=dopost $uurl_array =array ( 'id' =>123, 'name' => 'dopost' ); $now_url = 'http://'.$_SERVER['HTTP_HOST'].'/index/cate/listt?'.h

作者
王明昌
发布时间
最后更新
形成的链接: http://localhost/index/cate/listt?id=123&name=dopost
        $uurl_array =array ( 'id' =>123, 'name' => 'dopost' );
        $now_url = 'http://'.$_SERVER['HTTP_HOST'].'/index/cate/listt?'.http_build_query( $uurl_array );
        echo $now_url;
反馈邮箱