feebs Posted April 2, 2008 Report Share Posted April 2, 2008 Izmet Notice: Undefined index: admin in C:\Program Files\Apache Group\Apache\htdocs\private\inc\libs.inc on line 370 } function adminMode () { if (sizeof($_COOKIE)>0) { session_start(); if ($_SESSION['admin'] == true) { return true; } else { return false; } } else { return false; } } Link to comment Share on other sites More sharing options...
Aleksejs Posted April 2, 2008 Report Share Posted April 2, 2008 if (isset($_SESSION['admin']) && $_SESSION['admin'] == true) Link to comment Share on other sites More sharing options...
feebs Posted April 2, 2008 Author Report Share Posted April 2, 2008 Nevajag taisīt muļķīgas QUOTEs! Nostraadaaja, bet ko dot papildus isset Ir vel dazas kludas - varbut vari palidzet? Undefined index: PATH_INFO in C:\Program Files\Apache Group\Apache\htdocs\private\inc\libs.inc on line 80 Undefined index: print in C:\Program Files\Apache Group\Apache\htdocs\private\inc\libs.inc on line 83 { include ('navi.inc'); $this->connection=$this->doConnect($connstring); $this->encoding=$langprops[$language]['internal']; $this->page=$pages[$language][$name]; $this->page['encoding']=$langprops[$language]['template']; $this->page['adminmode']=$this->adminMode(); $this->page['params']=$this->getParams(); $this->page['sliders']=$this->arrRandom(2, 4); $this->page['sourceurl']='http://'.$_SERVER["SERVER_NAME"].$_SERVER['PHP_SELF'].$_SERVER['PATH_INFO']; $this->page['basicsitevars']=$this->readBasicsItem($this->page); if ($_GET['print']=='true') { $this->page['template']=$printtpl[$language]; $this->page['printmode']=true; } //$this->readNews(false, Array(3),3,3); } Link to comment Share on other sites More sharing options...
bubu Posted April 2, 2008 Report Share Posted April 2, 2008 isset tavā gadījumā pārbauda vai masīvā ir meklētais elements. Tavas "Undefined index" kļūdas vari salabot nelietojot par masīva indeksiem neeksistējošus masīva elementu atslēgas. Link to comment Share on other sites More sharing options...
777 Posted April 2, 2008 Report Share Posted April 2, 2008 Undefined index: PATH_INFO in C:\Program Files\Apache Group\Apache\htdocs\private\inc\libs.inc on line 80 nav definets define("PATH_INFO", "..."); Link to comment Share on other sites More sharing options...
feebs Posted April 2, 2008 Author Report Share Posted April 2, 2008 nav definets define("PATH_INFO", "..."); Ka vins defineejas? Link to comment Share on other sites More sharing options...
feebs Posted April 2, 2008 Author Report Share Posted April 2, 2008 isset tavā gadījumā pārbauda vai masīvā ir meklētais elements.Tavas "Undefined index" kļūdas vari salabot nelietojot par masīva indeksiem neeksistējošus masīva elementu atslēgas. Kuras sajaa gadijumaa skaitaas masiivu elementu atsleegas? Link to comment Share on other sites More sharing options...
777 Posted April 2, 2008 Report Share Posted April 2, 2008 (edited) man no kurienes zinat ko tu gribi ar PATH_INFO definet ... define("PATH_INFO", "tas ko tu gribi ar to definet"); $this->page['sourceurl']='http://'.$_SERVER["SERVER_NAME"].$_SERVER['PHP_SELF'].PATH_INFO.''; Edited April 2, 2008 by 777 Link to comment Share on other sites More sharing options...
feebs Posted April 2, 2008 Author Report Share Posted April 2, 2008 man no kurienes zinat ko tu gribi ar PATH_INFO definet ... define("PATH_INFO", "tas ko tu gribi ar to definet");$this->page['sourceurl']='http://'.$_SERVER["SERVER_NAME"].$_SERVER['PHP_SELF'].PATH_INFO.''; Vai taa nevareetu buut, ka nav iisti nokonfigurets apachis, php, vai nav nomainitas dir. celi, jo sim visam vajadzeetu iet bez mainiisanas, jo lapa ir nemta straadaajosa. Link to comment Share on other sites More sharing options...
Aleksejs Posted April 2, 2008 Report Share Posted April 2, 2008 (edited) no dokumentācijas: http://lv.php.net/reserved.variables 'PATH_TRANSLATED' Filesystem- (not document root-) based path to the current script, after the server has done any virtual-to-real mapping. Note: As of PHP 4.3.2, PATH_TRANSLATED is no longer set implicitly under the Apache 2 SAPI in contrast to the situation in Apache 1, where it's set to the same value as the SCRIPT_FILENAME server variable when it's not populated by Apache. This change was made to comply with the CGI specification that PATH_TRANSLATED should only exist if PATH_INFO is defined. Apache 2 users may use AcceptPathInfo = On inside httpd.conf to define PATH_INFO. Edited April 2, 2008 by Aleksejs Link to comment Share on other sites More sharing options...
gurkjis Posted April 2, 2008 Report Share Posted April 2, 2008 varbūt php koda sākumā palaid šo rindiņu: error_reporting(E_ALL & ~E_NOTICE); tas atslēgs E_NOTICE kļūdu rādīšanu. error reporting vērtību var uzlikt arī iekš php.ini Link to comment Share on other sites More sharing options...
Recommended Posts