zoukankan      html  css  js  c++  java
  • php随笔

    1 redirect注意 301 302是不同的,301永久跳转,不影响排名

         if($count<1){
                   Header("HTTP/1.1 301 Moved Permanently");
                   Header("Location: /cp?q=".$q);
                   die();
         } 

    2 中文编码

    if(mb_detect_encoding($_REQUEST['q'])=='ASCII'){
      //对应form提交编码 js encodeURIComponent
      $_REQUEST['q']=urldecode($_REQUEST['q']);
     }
     php的urlencode无需再urldecode

    3 php webservice取数据

      两边md5加密结果有时不同导致返回数据为空,所以一般最好返回时不做md5的验证,or some other better function

  • 相关阅读:
    【C-数据类型 常量 变量】
    【OC简介-类和对象】
    【ios面试总结】
    【OC基础语法考试】
    【C-01关键字】
    UI3
    ui2
    UI
    C++使用shell命令
    字典
  • 原文地址:https://www.cnblogs.com/ai464068163/p/2600550.html
Copyright © 2011-2022 走看看