07-26-2016, 03:11 AM
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
Is there any way to be able to use php time() like what I am after?
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!