feebs Posted March 29, 2008 Report Share Posted March 29, 2008 Ar ko ir saistits sis pazinojums? Par ko atbild C:\php5\pear? Warning: require(setup.inc) [function.require]: failed to open stream: No such file or directory in C:\Program Files\Apache Group\Apache\htdocs\index.php on line 8 Fatal error: require() [function.require]: Failed opening required 'setup.inc' (include_path='.;C:\php5\pear') in C:\Program Files\Apache Group\Apache\htdocs\index.php on line 8 Link to comment Share on other sites More sharing options...
Kavacky Posted March 29, 2008 Report Share Posted March 29, 2008 (edited) Tev include_path nepareizs. Tas ir, tu nenorādi pareizo vietu, kur meklēt failus. Edited March 29, 2008 by Kavacky Link to comment Share on other sites More sharing options...
feebs Posted March 29, 2008 Author Report Share Posted March 29, 2008 Tev include_path nepareizs. Tas ir, tu nenorādi pareizo vietu, kur meklēt failus. kur vins ir jaanoraada? Link to comment Share on other sites More sharing options...
feebs Posted March 29, 2008 Author Report Share Posted March 29, 2008 kur vins ir jaanoraada? Varbut kaads var pateikt, kas taa ir par probleemu? Cik noprotu vaina ir 8.liinijaa: require('setup.inc'); index: <?php //error_reporting(E_ALL); //do banera BEGIN if (strstr($_SERVER['HTTP_USER_AGENT'],'Opera') || strstr($_SERVER['HTTP_USER_AGENT'],'Gecko')) $flash=0; else $flash=1; //do banera END require('setup.inc'); $mysite = new Site ("pl","index",$connstring); $content=$mysite->processForSmarty(); $smarty = new Smarty_PBKM; $smarty->assign("content",$content); //do banera BEGIN $smarty->assign("flash",1); //do banera END //include ('ankieta.php'); $smarty->display($mysite->page['template']); $mysite->undoConnect(); ?> Link to comment Share on other sites More sharing options...
Val Posted March 29, 2008 Report Share Posted March 29, 2008 fails setup.inc ir vispār izveidots/atrodas tajā pašā direktorijā, kur index.php ? Link to comment Share on other sites More sharing options...
feebs Posted March 29, 2008 Author Report Share Posted March 29, 2008 fails setup.inc ir vispār izveidots/atrodas tajā pašā direktorijā, kur index.php ? tas fails setup.inc atrodas pec cita cela. Vai vinu var kadi noradit index.php faila? Link to comment Share on other sites More sharing options...
Val Posted March 30, 2008 Report Share Posted March 30, 2008 jā. Link to comment Share on other sites More sharing options...
777 Posted March 30, 2008 Report Share Posted March 30, 2008 (edited) tas fails setup.inc atrodas pec cita cela. Vai vinu var kadi noradit index.php faila? @require_once("/cels_uz_tavu_failu/setup.inc.php"); Edited March 30, 2008 by 777 Link to comment Share on other sites More sharing options...
feebs Posted March 31, 2008 Author Report Share Posted March 31, 2008 fails setup.inc ir vispār izveidots/atrodas tajā pašā direktorijā, kur index.php ? Vai vispar nepastav tada iespeja, ka to failu varetu kadi sameklet automataa require('setup.inc') nenoradot celu? Vai tomer vienmer ir jabut require('C:\mans\celsh\setup.inc'); Link to comment Share on other sites More sharing options...
bubu Posted March 31, 2008 Report Share Posted March 31, 2008 Parasti var izmantot relatīvo ceļu līdz failam. Absolūtais nav obligāts. Link to comment Share on other sites More sharing options...
feebs Posted March 31, 2008 Author Report Share Posted March 31, 2008 Nevajag taisīt muļķīgas QUOTEs Vai relativais buutu require('/celsh/setup.inc') un absolutais require('C:\mans\celsh\setup.inc') Vai vispar nepastav tada iespeja, ka to failu varetu kadi sameklet automataa require('setup.inc') nenoradot celu? Vai tomer vienmer ir jabut require('C:\mans\celsh\setup.inc'); Link to comment Share on other sites More sharing options...
777 Posted March 31, 2008 Report Share Posted March 31, 2008 http://www.php.net/manual/en/function.is-dir.php Link to comment Share on other sites More sharing options...
feebs Posted March 31, 2008 Author Report Share Posted March 31, 2008 http://www.php.net/manual/en/function.is-dir.php index.php: <?php //error_reporting(E_ALL); //do banera BEGIN if (strstr($_SERVER['HTTP_USER_AGENT'],'Opera') || strstr($_SERVER['HTTP_USER_AGENT'],'Gecko')) $flash=0; else $flash=1; //do banera END require('setup.inc'); $mysite = new Site ("pl","index",$connstring); $content=$mysite->processForSmarty(); $smarty = new Smarty_PBKM; $smarty->assign("content",$content); //do banera BEGIN $smarty->assign("flash",1); //do banera END //include ('ankieta.php'); $smarty->display($mysite->page['template']); $mysite->undoConnect(); ?> bet ka sajaa piemeeraa require('setup.inc') vinsh var atrast, ja fails setup.inc neatrodas index.php direktorija? Link to comment Share on other sites More sharing options...
bubu Posted March 31, 2008 Report Share Posted March 31, 2008 Vai relativais buutu require('/celsh/setup.inc') un absolutais require('C:\mans\celsh\setup.inc') Nē, tie abi ir absolūtie ceļi. Pirmais ir absolūtais ceļs Linux vidēs un otrais Windows vidēs. Relatīvo ceļu piemēri: require('setup.inc') - tekošajā direktorijā require('../setup.inc') - vienu direktoriju uz augšu require('../snjaga/setup.inc') - vienu direktoriju uz augšu un iekšā snjaga direktorijā Īsāk sakot - absolūtais ceļš ir tāds, kurš sākas no failsistēmas sākuma. Ja ceļa sākumā ir / vai X:\ vai kautkāds file://C:/ tad tie ir absolūtie ceļi. Link to comment Share on other sites More sharing options...
feebs Posted March 31, 2008 Author Report Share Posted March 31, 2008 Nē, tie abi ir absolūtie ceļi. Pirmais ir absolūtais ceļs Linux vidēs un otrais Windows vidēs.Relatīvo ceļu piemēri: require('setup.inc') - tekošajā direktorijā require('../setup.inc') - vienu direktoriju uz augšu require('../snjaga/setup.inc') - vienu direktoriju uz augšu un iekšā snjaga direktorijā Īsāk sakot - absolūtais ceļš ir tāds, kurš sākas no failsistēmas sākuma. Ja ceļa sākumā ir / vai X:\ vai kautkāds file://C:/ tad tie ir absolūtie ceļi. Tas butu skaidrs, bet ka var require('setup.inc') - tekošajā direktorijā atrast 'setup.inc', ja ir vairaki index faili, kuri atrodas vienu direktoriju uz augšu un katrs citaas mapess un tie palaizoties ari pieprasa setup.inc, bet tas setup.inc atrodas divas direktorijas uz aukshu.. Varbuut mani jautaajumi izklausaas diivaini, bet tas ir tadel, ka es esmu dabujis jau izstraadaatu lapu, kuru vajadzetu palaist, bet nevaru iisti iebraukt kaa taa palaizhaas :( Link to comment Share on other sites More sharing options...
Recommended Posts