首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

PHP转ASP解决思路

2012-03-09 
PHP转ASP本人菜鸟一个,希望来个高手帮下面PHP代码用ASP代码写一下出来!非常感谢!PHP code$Mobile trim($

PHP转ASP
本人菜鸟一个,希望来个高手帮下面PHP代码用ASP代码写一下出来!非常感谢!

PHP code
$Mobile = trim($_POST['Mobile']);$SmsName = trim($_POST['SmsName']);$MO = trim($_POST['MO']);list($ChkSmsName,$Product,$Content)=preg_split('/[\s]+/',$MO);if($SmsName == $ChkSmsName){    $Product = trim($Product);    switch($Product)    {       case 'FUR':          $sMsg = "REQUEST FUR";          break;       case 'EBC':          $sMsg = "HELLO EBC";          break;       default:          $sMsg = "HELLO EVERYONE";    }}else{    $sMsg = "ERROR";}


[解决办法]
Mobile =trim(request.Form("moblie"))
SmsName =trim(request.Form("SmsName"))
MO =trim(request.Form("MO"))
arrrs=split('/[\s]+/',$MO)
ChkSmsName=arrrs[0]
Product=arrrs[1]
Content=arrrs[2]

if SmsName=ChkSmsName then
Product=trim(Product)
select case Product
case 'FUR':
sMsg = "REQUEST FUR"
break
case 'EBC':
sMsg = "HELLO EBC"
break;
default:
sMsg = "HELLO EVERYONE"
else
sMsg = "ERROR"

end if


大概就这样吧..可能有语法错误! 没有调试..
[解决办法]
1楼的这里要改下
if SmsName=ChkSmsName then
Product=trim(Product)
select case Product
case "FUR"
sMsg = "REQUEST FUR"
case "EBC"
sMsg = "HELLO EBC"
case else
sMsg = "HELLO EVERYONE"
End select
else
sMsg = "ERROR"
end if

热点排行
Bad Request.