Session,autoload (), related issues. Seek expert enlighten.

Source: Internet
Author: User
Tags autoload
Session,__autoload (), question. Seek expert enlighten. -。 -
After I opened a session, I want to set the session's effective time, how to set! I changed the php.ini config file inside the Session.cache_expire = 1, no implementation ... Modified the session.gc_maxlifetime=10, and did not get the desired effect. Ask for advice-. -!



And also.......
PHP file Loaded __autoload ($class _name) {
}


I used AutoLoad () in the first file to introduce other files, and this method was used at the beginning of the second file. Then I instantiate the 2 classes in 3 files. Err:cannot redeclare __autoload () (previously declared in c:\appserv\www\test\autoload_test.php:1) in C:\AppServ\www\ test\include1.php on line 4
Concise Code:
File 1:
function __autoload ($class _name) {
Include $class _name. ". PHP ";
}
Class include1{}
?>
File 2:
function __autoload ($class _name) {
Include $class _name. ". PHP ";
}
Class include2{}
?>
File 3:
Include $class _name. ". PHP ";
}
$inculde 1=new include1 ();
$inculde 2=new Include2 ();
?>
Please advise.

------Solution--------------------
Second question you have declared this function in the third file, and you don't have to re-fame anywhere else.
------Solution--------------------
Session_cache_expire (1); Be sure to put it before session_start ()
  • 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.