daGrevis Posted April 2, 2009 Report Share Posted April 2, 2009 Problēma ir pavisam vienkārša. Ir galvenais fails (core.php), kurā ir norādīts "$rootPath" un "$stylePath". $rootPath = $serverProtocol . "://" . $serverDirectory . "/" . $serverSubDirectory . "/"; $stylePath = $rootPath . "styles/" . $defaultStyle . "/"; Tad core.php ir iekļauts konfigurācijas fails. $serverProtocol = 'http'; $serverDirectory = '127.0.0.1'; $serverSubDirectory = 'prototype'; $defaultStyle = "proLite"; Veidojot funkciju core.php failā - "overallHeader", dabūju šādu ķļudu. Warning: require() [function.require]: URL file-access is disabled in the server configuration in D:\xampp\htdocs\prototype\includes\core.php on line 39 Warning: require(http://127.0.0.1/prototype/styles/proLite/overallHeader.php) [function.require]: failed to open stream: no suitable wrapper could be found in D:\xampp\htdocs\prototype\includes\core.php on line 39 Fatal error: require() [function.require]: Failed opening required 'http://127.0.0.1/prototype/styles/proLite/overallHeader.php' (include_path='.;D:\xampp\php\pear\') in D:\xampp\htdocs\prototype\includes\core.php on line 39 Funkcija izskatāš šāda. function overallHeader($pageTitle = "") { global $alive, $siteTitle, $stylePath; if(!$alive) { echo "Site is down for maintenance, please check back again later..."; die; } if($pageTitle == "") { $pageTitle = $siteTitle; } header("Content-Type: text/html; charset=utf-8"); require $stylePath . "overallHeader.php"; } Idejas? Vai norādīt "root" mainīgos savādāk, vai ieslēgt serveī tādu iespēju? ;? Quote Link to comment Share on other sites More sharing options...
marcis Posted April 2, 2009 Report Share Posted April 2, 2009 Lieto lokālos ceļus. $rootPath = $_SERVER['DOCUMENT_ROOT']."/" . $serverSubDirectory . "/"; $stylePath = $rootPath . "styles/" . $defaultStyle . "/"; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.