TP 框架使用时的盲点

来源:互联网 发布:防止微信屏蔽分享域名 编辑:程序博客网 时间:2024/04/30 16:42

1:页面跳转

  1:function Mes($mes,$url){
  echo "<script>
  alert('$mes');
  window.location.href='$url';
  </script>";
  }


       2:$this->redirect();
3:

页面跳转遇到的方法:location.href:url();   2 header(location:url());  window.location.href:url();

页面返回用到的语句:history.Go(--1)      more information  !!!!!!

$this->redirect(string url, array params, int delay, string msg) 
参数说明:参数说明url必须,重定向的 URL 表达式。params可选,其它URL参数。delay可选, 重定向延时,单位为秒。msg可选,重定向提示信息。

ThinkPHP redirect 实例

在 Index 模块 index 方法中,重定向到本模块的 select 操作:

class IndexAction extends Action{    public function index(){        $this->redirect('select', array('status'=>1), 3, '页面跳转中~');    }}

2:文件上传时,使用$_FILES来搜集信息;
3:  数据库中表的名字与modle模型类的名字有关

0 0
原创粉丝点击