Php <;脚本>;document.location.href=''</脚本>&;转到页面相关问题
尝试使用Php <;脚本>;document.location.href=''</脚本>&;转到页面相关问题,php,sms,location,Php,Sms,Location,尝试使用标记 <?php $config['SMS_ID']="test"; $config['SMS_PW']="test1234"; $config['cf_tel']='01234567'; $post_data = array( "remote_id" => $config['SMS_ID'], "remote_pass" => $config['SMS_PW'], "re
标记
<?php
$config['SMS_ID']="test";
$config['SMS_PW']="test1234";
$config['cf_tel']='01234567';
$post_data = array(
"remote_id" => $config['SMS_ID'],
"remote_pass" => $config['SMS_PW'],
"remote_num" => 1,
"remote_reserve" => 0,
"remote_phone" => $_POST[number],
"remote_callback" => $config['cf_tel'],
"remote_msg" => $_POST[counsle]
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.mymunja.co.kr/Remote/RemoteSms.html" );
curl_setopt($ch, CURLOPT_POST, 1 );
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$msg = curl_exec($ch);
curl_close($ch);
?>
<? echo "<script> alert('Done');</script>"; ?>
<? echo "<script> document.location.href='$_POST[returnUrl]';</script>"; ?>
我猜是
<? echo "<html><script> alert('Done');</script></html>"; ?>
<? echo "<html><script> document.location.href='$_POST[returnUrl]';</script></html>"; ?>
您的问题是字符串分隔符请尝试var_dumpvar_dump($\u POST[“returnUrl]”)代码>并发布输出。。请张贴您收到的错误,以便我们能够清楚地了解出了什么问题
<? echo "<script> document.location.href='$_POST[returnUrl]';</script>"; ?>
<?php
$config['SMS_ID']="test";
$config['SMS_PW']="test1234";
$config['cf_tel']='01234567';
$post_data = array(
"remote_id" => $config['SMS_ID'],
"remote_pass" => $config['SMS_PW'],
"remote_num" => 1,
"remote_reserve" => 0,
"remote_phone" => $_POST[number],
"remote_callback" => $config['cf_tel'],
"remote_msg" => $_POST[counsle]
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.mymunja.co.kr/Remote/RemoteSms.html" );
curl_setopt($ch, CURLOPT_POST, 1 );
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$msg = curl_exec($ch);
curl_close($ch);
?>
<? echo "<script> alert('Done');</script>"; ?>
<? echo "<script> document.location.href='$_POST[returnUrl]';</script>"; ?>
<? echo "<html><script> alert('Done');</script></html>"; ?>
<? echo "<html><script> document.location.href='$_POST[returnUrl]';</script></html>"; ?>
<input type="hidden" name="returnUrl" value="<? =PHP_SELF?>">
<input type="hidden" name="returnUrl" value="<?=PHP_SELF?>">
<? echo "<script> document.location.href="$_POST[returnUrl]";</script>"; ?>