您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

PHP 远程调用有关问题!望高手帮忙教下如何做

2024/8/24 1:05:40发布23次查看
php 远程调用问题!望高手帮忙教下怎么做!
以下是我自己弄的!
建立个 123.php文件 如下
$url = http://www.123456.com/ajax.ashx?action=addorder&orderidshow=1&id=10086&amt=10&mb=2&[email protected];
$result = file_get_contents($url);
echo $result;

显示出的结果是 yes_5e286f3e
可是我想把 yes_去掉 单单显示出 5e286f3e 请问我需要怎么做! 本人小菜一个,望高手能帮忙解答!
------解决思路----------------------
$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;

该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product