Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14343

Private vairable not working

$
0
0
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();
 
  }



Viewing all articles
Browse latest Browse all 14343

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>