simplexml_load_file with & (ampersand) in url with Solr

后端 未结 2 1755
醉梦人生
醉梦人生 2021-01-24 17:45

I am using Solr and have the following query which works fine from my browser:

 http://www.someipaddress.com:8983/solr/select?q=*&fq=shopid:40&start=0&am         


        
2条回答
  •  佛祖请我去吃肉
    2021-01-24 18:29

    Try: simplexml_load_file(rawurlencode('http://127.0.0.1:8983/solr/select?q=*&fq=shopid:40&start=0&rows=18&fq=manufacturer:"Bausch' .urlencode('&'). 'Lomb"'))

    See note on file parameter: http://php.net/manual/en/function.simplexml-load-file.php

提交回复
热议问题