How to remove  in a PHP string

后端 未结 7 2116
太阳男子
太阳男子 2021-01-14 07:36

I am trying to use the Microsoft Bing API.

$data = file_get_contents(\"http://api.microsofttranslator.com/V2/Ajax.svc/Speak?appId=APPID&text={$text}&         


        
7条回答
  •  佛祖请我去吃肉
    2021-01-14 08:06

    $data = str_replace('%EF%BB%BF', '', $data);

    You probably shouldn't be using stripslashes -- unless the API returns blackslashed data (and 99.99% chance it doesn't), take that call out.

提交回复
热议问题