Advertisement
Guest User

Start session in separate file

a guest
Jul 29th, 2012
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.16 KB | None | 0 0
  1. file session.php:
  2. <?php
  3. session_set_cookie_params(time()+3600*24*365*5);
  4. session_start();
  5.  
  6.  
  7. other files
  8. <?php
  9. include 'session.php';
  10.  
  11. //your code here
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement