Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Array key strings without quotation marks

I am moving the files to the server and is using variables like $_GET[mode] without ''(single quotes) in 'mode'. It works perfectly locally but on the server i am getting notices.. How can i overcome this?here is my phpinfo file phpinfo Is there any way we can have same behavior to work on server as well?

like image 898
June Avatar asked Sep 17 '26 05:09

June


1 Answers

How can you overcome the E_NOTICEs that complain that you forgot quotes around your strings?

Add quotes around your strings.

$_GET['mode']

Also it sounds like the error_reporting level on your local server is not sufficient. It should be high, so that you see these sorts of mistakes as you develop your website/application.

On your production server it may be set lower.

like image 111
Lightness Races in Orbit Avatar answered Sep 19 '26 18:09

Lightness Races in Orbit