<?
  $sender=$mobile;
  if ($sender=="")   {echo 3; exit();}
  
  $sendto=$spn;
  if ($sendto=="")   {echo 4; exit();}
  
  $service=$service;
  if ($service=="")   {echo 6; exit();}
  
  $linkid=$linkid;
  
  $momsg=$msg;  
  if ($momsg=="")   {echo 5; exit();}   
  
  
  $currdate=date("Y-m-d H:i:s");
  $msgid = date("mdhis");
  
 $sqlstr =  "insert into sms.sms_recvlist(sender,sendto,recv_msg,recv_state,deal_state,recv_time,service_id,company_id,gateway_id,linkid) 
      values( '$sender','$sendto','$momsg','没有处理','没有处理','$currdate','$service','0181','mobile','$linkid')";
    $DataExecuteObject-> SQLExecute = $sqlstr;
     $DataExecuteObject-> Execute();?>

解决方案 »

  1.   

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.如果msg=汉字,则在IE出现下列错误
    ----------------------------------------Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.More information about this error may be available in the server error log.
    --------------------------------------------------------------------------------Apache/2.0.44 (Win32) Server at 127.0.0.1 Port 80
      

  2.   

    $momsg=$msg;
    if ($momsg=="") {echo 5; exit();} 改成$momsg=urlencode($msg);
    if ($momsg=="") {echo 5; exit();} 
    试试看,不过这也不该造成服务器500错误啊
      

  3.   

    $momsg=$msg;
    if ($momsg=="") {echo 5; exit();} 改成$momsg=urlencode($msg);
    if ($momsg=="") {echo 5; exit();} 
    我这样改了,还是没有变化呐...
      

  4.   

    values( '$sender','$sendto','$momsg','没有处理','没有处理','$currdate','$service','0181','mobile','$linkid')";改成
    '".$momsg."'试试
      

  5.   

    不对哈,我感觉方向都没有对.改成
    '".$momsg."'了,还是没有对
      

  6.   

    我注掉了,还是不行.....好像参数中一有汉字就有问题.联不联数据库都一样....如果msg=汉字,则在IE出现下列错误   ,会不会是我apache配置不对?
    ----------------------------------------Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.More information about this error may be available in the server error log.
    --------------------------------------------------------------------------------Apache/2.0.44 (Win32) Server at 127.0.0.1 Port 80
      

  7.   

    还真没遇到过这个问题!was unable to complete your request.不能完全处理您的请求!
      

  8.   

    我用Idhttp.post可以成功提交数据.脚本也没有问题....但是在IE里面测试就不行...
      

  9.   

    我修改为:
    $momsg=urlencode($msg);
      if ($momsg=="")   {echo 5; exit();}   
    ...........还是不行呐
      
      

  10.   

    iconv('GBK','UTF-8',"$msn"); 转换一下!
      

  11.   

    请更换你的apache版本,2.0的有一个版本有这个bug
      

  12.   

    这个问题我今天也碰到过,你加上mysql_query("SET NAMES GBK");就可能了啊,
      

  13.   

    1 用 APACHE 1.3.20以下版本可以。2 在客户端做 UrlEncode.
      

  14.   

    在數據庫類初識話的時候mysql_query("SET NAMES *charset*");