Friday, 15 August 2014

php - Finding Value Of An Index When Index Not Found -



php - Finding Value Of An Index When Index Not Found -

i migrating site new server.

on first server site run fine.

in new server file paths changing server_root_dir_path

i clearing errors , 2 of errors typical , mutual

notice: undefined index: page in /home4/filepath/index.php on line 6 notice: undefined variable: admin in /filepath/libraries.php on line 3 notice: undefined index: theme in /home4/filepath/index.php on line 6

my question is...

in situation trying solve each notice , error.

so start variable , want know value of since undefined on server b

i go server , var_dump($admin);

is there type of equivalent on server see page or theme exactly?

this how in actual files,

if ($_get["page"]=="my_home"){$_get["page"]="my_handshakes";} elseif($_cookie["theme"]){

i realize add together isset these when errors , notice clear page loads blank.

so clear,

is there way var_dump page or theme on first server site running on see values supposed be?

from code posted, variable looking $_get["page"]. "undefined index" means found $_get array, no item in key "page".

so, firstly, yes, can var_dump($_get["page"]) on working server, nil special needed there.

secondly, though, should know $_get represents query string of loaded page, unless there ugly code creating false entries in it, expected url containing ?page=something.

finally, have tried setting old server have same setting of error_reporting new one? since these notices, it's exclusively possible they've been there along, hidden settings, , actual problem page somewhere else altogether.

php

No comments:

Post a Comment