文章詳情頁
php 如何獲取第一個參數?
瀏覽:75日期:2022-06-02 15:41:28
問題描述
大佬們
URL鏈接如下 https://www.baidu.cn/?d&b_scene_zt=1&renqun_youhua=375297
如何獲取第一個?后面的參數呢
問題解答
回答1:$test = parse_url("http://localhost/index.php?name=tank&sex=1#top");print_r($test);
試試
回答2:試一下
$url = "https://www.baidu.cn/?d&b_scene_zt=1&renqun_youhua=375297";echo parse_url($url)['query'];$str = explode("&",parse_url($url)['query']);
echo '<pre>'.print_r($str,true).'';
上一條:登錄功能報錯下一條:請問這是jeson嗎?如何遍歷出來?
相關文章:
1. 輸入地址報以下截圖錯誤,怎么辦?2. angular.js - angularJs ngRoute怎么在路由傳遞空字符串及用ng-switch取得3. javascript - 求助一個關于indexedDB的問題4. 我何時應該在Java中使用JFrame.add(component)和JFrame.getContentPane()。add(component)5. html5 - video ios不能播放怎么辦?6. android - xml的drawable作背景,是否會產生錯誤7. python - pip install出現下面圖中的報錯 什么原因?8. node.js - node中MYSQL的異步問題9. javascript - ie11以下單擊打開不了file,雙擊可以。求解?10. vim里的高亮javascript的javascript.vim 已經放到syntax里了,但是不行。
排行榜
