Hi,
I've just gone through the php tutorial on the above stated but keep getting this error:
"Strict Standards: Only variables should be passed by reference"
this then points to the line on the init.inc.php which reads:
[syntax=php]
$page = substr(end(explode('/', $_SERVER['SCRIPT_NAME'])), 0, -4);
[/syntax]
Is there a way around this?
Cheers for the tutorial btw =]
Register and Login (User Account System) - Error
Re: Register and Login (User Account System) - Error
Yes, there are two ways to do this.
The first one is to turn of error reporting. That error is not harmful in any way. So removing strict reporting from your error reporting would be sensible.
The other one is to split the functions to new lines like this:
[syntax=php]$page = explode('/', $_SERVER['SCRIPT_NAME']);
$page = end($page);
$page = substr($page, 0, -4);[/syntax]
The first one is to turn of error reporting. That error is not harmful in any way. So removing strict reporting from your error reporting would be sensible.
The other one is to split the functions to new lines like this:
[syntax=php]$page = explode('/', $_SERVER['SCRIPT_NAME']);
$page = end($page);
$page = substr($page, 0, -4);[/syntax]
Re: Register and Login (User Account System) - Error
It's not even an error, it's a "you should do it like this" message
You can safely hide the message as Temor said, but I would not turn error reporting off as that would hide useful errors too, you should set it to E_ALL only.
You can safely hide the message as Temor said, but I would not turn error reporting off as that would hide useful errors too, you should set it to E_ALL only.