PHP 远程调用问题!望高手帮忙教下怎么做! phpurlemailjson 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你去到结果后如果你只是想去掉YES_那你完全可以采用正则或者是切割按照_来切割取后面的就好了。 $str = "YES_5e286f3e";$arr = explode('_',$str);echo $arr[1]; $url = "http://www.123456.com/Ajax.ashx?Action=AddOrder&OrderIDShow=1&id=10086&Amt=10&Mb=2&[email protected]"; $result =explode('_',file_get_contents($url));echo $result[1]; $result = ltrim('YES_5e286f3e','YES_');echo $result; 這樣就可以了。$url = "http://www.123456.com/Ajax.ashx?Action=AddOrder&OrderIDShow=1&id=10086&Amt=10&Mb=2&[email protected]"; $result = file_get_contents($url); $result = str_replace('YES_', '', $result); // 把YES_替換為空echo $result; 把'YES_'替换为空即可。参考函数:str_replace(); 遍历对象 并获取对象值 如何实现无刷新的用户名检测! mysql_connect和mysql_close具体使用 帮我一个html问题。 一个关于extjs的问题 php有动态数组吗? 请教高手,如何用PHP得到当前浏览器是Mozilla及其版本号。 文字变成乱码是怎么回事? php3支持session吗,要是不支持,登陆该怎么做啊,好痛苦啊!!! php 数据库添加失败 wdcp集成环境怎么使用openssl连接工商银行网银接口,签名 linux服务器安装php问题
$str = "YES_5e286f3e";
$arr = explode('_',$str);
echo $arr[1];
$result =explode('_',file_get_contents($url));
echo $result[1];
$result = ltrim('YES_5e286f3e','YES_');
echo $result;
$result = file_get_contents($url);
$result = str_replace('YES_', '', $result); // 把YES_替換為空
echo $result;
参考函数:str_replace();