[SOLVED] - Constants Usage
Posted: Wed Jun 01, 2005 1:21 pm
Hi
Im using a specific job cms for my client.
Currently its just setup on the site with no MySQL data. Its working.
I downloaded the code and sql and set it up on my PC.
When I ran the site locally there were many notices - most (or all I think) are because of unknown constants.
Example :
Notice: Use of undefined constant d - assumed 'd' in C:\xxx\xxx.php on line n
When I looked at the code, it like this
$day = date(d);
obviously I changed it to $day = date("d"); and the notice went away.
But I find the entire code is like that - $arrayname[variable] when it should have been $arrayname[$variable].
How is this acceptable ? This cms was bought by my client and I dont understand how these many notices were left out - these dont show in the site though maybe because of display_errors = off.
Thanks
Im using a specific job cms for my client.
Currently its just setup on the site with no MySQL data. Its working.
I downloaded the code and sql and set it up on my PC.
When I ran the site locally there were many notices - most (or all I think) are because of unknown constants.
Example :
Notice: Use of undefined constant d - assumed 'd' in C:\xxx\xxx.php on line n
When I looked at the code, it like this
$day = date(d);
obviously I changed it to $day = date("d"); and the notice went away.
But I find the entire code is like that - $arrayname[variable] when it should have been $arrayname[$variable].
How is this acceptable ? This cms was bought by my client and I dont understand how these many notices were left out - these dont show in the site though maybe because of display_errors = off.
Thanks