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