Uploadify Firefox upload not successful, error message no session

Source: Internet
Author: User

With the thinkphp frame, just go to TP discussion to see a lot of, try a bit can not.
Don't quite understand what it is to be authenticated by login.

    public function _initialize(){                // 验证用户是否登陆        if (!session('?name') or !session('?dutydate')) {            $this->error('未登录,跳转到登录页面',__MODULE__.'/login/index',3);        }            }    

Read an article like this (http://www.edbiji.com/doccenter/showdoc/54/nav/702.html), the situation with me, I do not quite understand, he this article service-side code so what is the meaning of this writing?

//初始化执行    public function _initialize(){        //此处为解决Uploadify在火狐下出现http 302错误 重新设置SESSION        $session_name = session_name();        if (isset($_POST[$session_name])) {            session_id($_POST[$session_name]);            session_start();        }            //执行登陆验证检测函数        $this->powerverify();            }

Mine is this, I only Judge session (' name ') and session (' Dutydate '),
So if I'm going to accept the value of uploadify,post coming over. $_post[' test], this is my current session.
I write according to the meaning of the article, but I think it doesn't make any sense? What do you mean, I don't know what this piece means?

    public function _initialize(){        $session_name = $_POST['test'];        if (isset($_POST[$session_name])) {            session('name',$_POST[$session_name]);            session('[start]');        }                // 验证用户是否登陆        if (!session('?name') or !session('?dutydate')) {            $this->error('未登录,跳转到登录页面',__MODULE__.'/login/index',3);        }            }

There is a free God, help to see, debugging for a long time, or not, smoke is all finished ....

Reply content:

With the thinkphp frame, just go to TP discussion to see a lot of, try a bit can not.
Don't quite understand what it is to be authenticated by login.

    public function _initialize(){                // 验证用户是否登陆        if (!session('?name') or !session('?dutydate')) {            $this->error('未登录,跳转到登录页面',__MODULE__.'/login/index',3);        }            }    

Read an article like this (http://www.edbiji.com/doccenter/showdoc/54/nav/702.html), the situation with me, I do not quite understand, he this article service-side code so what is the meaning of this writing?

//初始化执行    public function _initialize(){        //此处为解决Uploadify在火狐下出现http 302错误 重新设置SESSION        $session_name = session_name();        if (isset($_POST[$session_name])) {            session_id($_POST[$session_name]);            session_start();        }            //执行登陆验证检测函数        $this->powerverify();            }

Mine is this, I only Judge session (' name ') and session (' Dutydate '),
So if I'm going to accept the value of uploadify,post coming over. $_post[' test], this is my current session.
I write according to the meaning of the article, but I think it doesn't make any sense? What do you mean, I don't know what this piece means?

    public function _initialize(){        $session_name = $_POST['test'];        if (isset($_POST[$session_name])) {            session('name',$_POST[$session_name]);            session('[start]');        }                // 验证用户是否登陆        if (!session('?name') or !session('?dutydate')) {            $this->error('未登录,跳转到登录页面',__MODULE__.'/login/index',3);        }            }

There is a free God, help to see, debugging for a long time, or not, smoke is all finished ....

Firefox does have a problem with uploadify, which is because Firefox's Flash is unable to deliver the current domain's cookie, and the official document has a solution to the problem.
Similar to how your code is handled.
Pass the session_id in the URL or POST request, or use this value to generate the session if there is a value in the request, or use the value in the cookie to get the session.

Get current user session through SESSION_ID, request to receive and then use SESSION_ID to specify user session and start
Probably as follows:

//上传前$auth = session_id();//传输该值//指定sessionif(!empty($_POST['auth'])){    session_id($_POST['auth']);    session_start();}else{    session_start();}
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.