file_get_contents("http://127.0.0.11/index.php/User_link/show_index/site_id/7/site_name/思柏恩")file_get_contents 如何获取参数 site_id=7 site_name=思柏恩  语言为 涉及php asp jsp 谢谢

解决方案 »

  1.   

    file_get_contents是获取内容的 获取地址参数 一般用parse_url 但你这个地址不好弄
    只能手动处理了
      

  2.   

    $str = "http://127.0.0.11/index.php/User_link/show_index/site_id/7/site_name/思柏恩";
    echo preg_replace('/.+site_id\/([^\/]+?)\/site_name\/(.+)/is','site_id=\\1 site_name=\\2',$str);正则表达式,这个通用。
      

  3.   

    和前面有个朋友怎么差不多?
    用rewrite或者你自己用php做路由