Welcome Guest, Not a member yet? Register   Sign In
Private vairable not working
#1

On the top above my __construct() area in my library I have a variable called $set_the_time_for_cookie_to_expire because the time() has brackets it is throwing error


Code:
A PHP Error was encountered

Severity: Parsing Error

Message: syntax error, unexpected '(', expecting ',' or ';'

Filename: libraries/Customer.php

Line Number: 6

Backtrace:


Is there any way to be able to use php time() like what I am after?


PHP Code:
private $customer_id;
private 
$set_the_time_for_cookie_to_expire time() + 20 60;
 
   
public function __construct() {
 
  $this->CI = &get_instance();
 
  $this->CI->load->library('session');

 
  if (!$this->CI->session->userdata('is_logged_in')) {
 
     $this->autologin();
 
  }


There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply


Messages In This Thread
Private vairable not working - by wolfgang1983 - 07-26-2016, 03:11 AM
RE: Private vairable not working - by InsiteFX - 07-26-2016, 04:09 AM
RE: Private vairable not working - by Wouter60 - 07-26-2016, 10:32 AM
RE: Private vairable not working - by InsiteFX - 07-26-2016, 11:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB