jonypedrosa Posted April 30, 2012 at 12:26 AM Report #452173 Posted April 30, 2012 at 12:26 AM config_templates.php (Correcta) <?php /* include class file */ include("/include/templateEngine/Savant3.php"); /* initiate new template class */ $tpl = new Savant3(); /* set default templates folder */ $tpl->setPath("template", $config['base_path'] . "/templates/" . $config['template'] . "/"); //deve estar aqui o erro ?> se tiver a config_templates.php (Errada por exempo) config_templates.php (Errada) <?php /* include class file */ include("/.............................../templateEngine/Savant3.php"); /* initiate new template class */ $tpl = new Savant3(); /* set default templates folder */ $tpl->setPath("template", $config['base_path'] . "/templates/" . $config['template'] . "/"); //deve estar aqui o erro ?> com erro config_templates.php (Errada) na pagina principal mostra isto: ( ! ) Warning: include(/inlude/templateEngine/Savant3.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\include\configs\config_templates.php on line 4 Call Stack # Time Memory Function Location 1 0.0012 668944 {main}( ) ..\index.php:0 2 0.0017 681016 include( 'C:\wamp\www\header.php' ) ..\index.php:4 3 0.0022 705536 include( 'C:\wamp\www\include\common.php' ) ..\header.php:4 4 0.0092 723680 include( 'C:\wamp\www\include\configs\config_templates.php' ) ..\common.php:9 ( ! ) Warning: include() [function.include]: Failed opening '/inlude/templateEngine/Savant3.php' for inclusion (include_path='.;C:\php\pear') in C:\wamp\www\include\configs\config_templates.php on line 4 Call Stack # Time Memory Function Location 1 0.0012 668944 {main}( ) ..\index.php:0 2 0.0017 681016 include( 'C:\wamp\www\header.php' ) ..\index.php:4 3 0.0022 705536 include( 'C:\wamp\www\include\common.php' ) ..\header.php:4 4 0.0092 723680 include( 'C:\wamp\www\include\configs\config_templates.php' ) ..\common.php:9 ( ! ) Fatal error: Class 'Savant3' not found in C:\wamp\www\include\configs\config_templates.php on line 7 Call Stack # Time Memory Function Location 1 0.0012 668944 {main}( ) ..\index.php:0 2 0.0017 681016 include( 'C:\wamp\www\header.php' ) ..\index.php:4 3 0.0022 705536 include( 'C:\wamp\www\include\common.php' ) ..\header.php:4 4 0.0092 723680 include( 'C:\wamp\www\include\configs\config_templates.php' ) ..\common.php:9 com config_templates.php (Correcta) na pagina inicial da o seguinte erro: ( ! ) Notice: Undefined variable: core in C:\wamp\www\footer.php on line 8 Call Stack # Time Memory Function Location 1 0.0015 668576 {main}( ) ..\index.php:0 2 0.0397 1375216 include( 'C:\wamp\www\footer.php' ) ..\index.php:11 Template error: Unable to load "index.tpl.php" O que tenho no footer.php <?php /* global template vars */ $tpl->config = $config; $tpl->_CONFIG = $_CONFIG; $tpl->user = $user; $tpl->page = $page; $tpl->core = $core; /* display template file */ $tpl->display($page . ".tpl.php"); ?>
jonypedrosa Posted April 30, 2012 at 01:35 PM Author Report #452250 Posted April 30, 2012 at 01:35 PM E precisso mais algum ficheiro php para saber qual e o erro? 😄
HappyHippyHippo Posted April 30, 2012 at 01:39 PM Report #452251 Posted April 30, 2012 at 01:39 PM onde estão declaradas as variáveis : - $config - $user - $page - $core uma boa maneira de saber qual é o erro é ler a mensagem de erro : ( ! ) Notice: Undefined variable: core in C:\wamp\www\footer.php on line 8 IRC : sim, é algo que ainda existe >> #p@p Portugol Plus
jonypedrosa Posted April 30, 2012 at 08:52 PM Author Report #452347 Posted April 30, 2012 at 08:52 PM Como e que resolvo o erro?
ruimcosta Posted April 30, 2012 at 10:04 PM Report #452372 Posted April 30, 2012 at 10:04 PM Warning: include(/inlude/templateEngine/Savant3.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\include\configs\config_templates.php on line 4 Aqui diz-te que o ficheiro Savant3.php não existe nessa pasta ou que tens o caminho errado. Começa por resolver isto. Abraços e beijinhos,Rui Costa
jonypedrosa Posted May 1, 2012 at 12:48 AM Author Report #452413 Posted May 1, 2012 at 12:48 AM No tópico já tenho a corrigido 🙂 o problema e o erro que da depois disso config_templates.php (Correcta) <?php /* include class file */ include("/include/templateEngine/Savant3.php"); /* initiate new template class */ $tpl = new Savant3(); /* set default templates folder */ $tpl->setPath("template", $config['base_path'] . "/templates/" . $config['template'] . "/"); //deve estar aqui o erro ?> ( ! ) Notice: Undefined variable: core in C:\wamp\www\footer.php on line 8 Call Stack # Time Memory Function Location 1 0.0015 668576 {main}( ) ..\index.php:0 2 0.0397 1375216 include( 'C:\wamp\www\footer.php' ) ..\index.php:11 Template error: Unable to load "index.tpl.php"
jonypedrosa Posted May 3, 2012 at 09:42 PM Author Report #452979 Posted May 3, 2012 at 09:42 PM Codico completo http://www.mediafire.com/?529nnssmutnlvmh conseguem ver o erro? 🙂
yoda Posted May 3, 2012 at 09:56 PM Report #452984 Posted May 3, 2012 at 09:56 PM Não é um erro, é um Notice, serve para avisar. Bom para ambientes de desenvolvimento, mau para ambientes de produção. Para os desabilitar : error_reporting(E_ALL ^ E_NOTICE); A parte referente ao template é bastante explícita, o ficheiro não existe. before you post, what have you tried? - http://filipematias.info sense, purpose, direction
jonypedrosa Posted May 3, 2012 at 10:41 PM Author Report #452994 Posted May 3, 2012 at 10:41 PM mas a pasta existe e tem la os ficheiros 🙂
amando96 Posted May 3, 2012 at 10:58 PM Report #452998 Posted May 3, 2012 at 10:58 PM Se estivessem mesmo não dava erro, tens acerteza que o caminho está certo?
HappyHippyHippo Posted May 4, 2012 at 01:34 AM Report #453012 Posted May 4, 2012 at 01:34 AM verifica os caminhos ... IRC : sim, é algo que ainda existe >> #p@p Portugol Plus
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now