当前位置: 代码迷 >> ASP >> PHP转ASP解决思路
  详细解决方案

PHP转ASP解决思路

热度:83   发布时间:2012-03-09 21:42:53.0
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
  相关解决方案