2004-03-28 15:24:19 +00:00
|
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
|
|
|
|
<!-- $Revision$ -->
|
2004-10-03 09:04:23 +00:00
|
|
|
|
<!-- EN-Revision: 1.2 Maintainer: thomasgm Status: ready -->
|
2004-03-28 15:24:19 +00:00
|
|
|
|
<chapter id="troubleshooting">
|
|
|
|
|
|
<title>Localiza<EFBFBD><EFBFBD>o de Erros</title>
|
|
|
|
|
|
<para></para>
|
|
|
|
|
|
<sect1 id="smarty.php.errors">
|
2004-09-21 15:05:45 +00:00
|
|
|
|
<title>Erros do Smarty/PHP</title>
|
2004-03-28 15:24:19 +00:00
|
|
|
|
<para>
|
2004-09-22 14:55:51 +00:00
|
|
|
|
O Smarty pode obter muitos erros, tais como: atributos de tags perdidos ou nomes de vari<72>veis
|
2004-09-21 15:05:45 +00:00
|
|
|
|
mal formadas. Se isto acontece, voc<6F> ver<65> um erro similar ao seguir:
|
2004-03-28 15:24:19 +00:00
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
<example>
|
|
|
|
|
|
<title>Erros do Smarty</title>
|
|
|
|
|
|
<programlisting>
|
|
|
|
|
|
Warning: Smarty: [in index.tpl line 4]: syntax error: unknown tag - '%blah'
|
|
|
|
|
|
in /path/to/smarty/Smarty.class.php on line 1041
|
|
|
|
|
|
|
|
|
|
|
|
Fatal error: Smarty: [in index.tpl line 28]: syntax error: missing section name
|
|
|
|
|
|
in /path/to/smarty/Smarty.class.php on line 1041</programlisting>
|
|
|
|
|
|
</example>
|
|
|
|
|
|
|
|
|
|
|
|
<para>
|
|
|
|
|
|
O Smarty te mostra o nome do template, o n<>mero da linha e o erro.
|
|
|
|
|
|
Depois disso, o erro consiste do n<>mero da linha da classe Smarty em que o erro
|
|
|
|
|
|
ocorreu.
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
<para>
|
2004-09-21 15:05:45 +00:00
|
|
|
|
H<> certos erros que o Smarty n<>o consegue detectar, tais como uma tag de fechamento errada.
|
|
|
|
|
|
Estes tipos de erro geralmente acabam gerando erros em tempo de processamento do interpretador
|
|
|
|
|
|
de erros do PHP.
|
2004-03-28 15:24:19 +00:00
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
<example>
|
|
|
|
|
|
<title>Erros de an<61>lise do PHP</title>
|
|
|
|
|
|
<programlisting>
|
|
|
|
|
|
Parse error: parse error in /path/to/smarty/templates_c/index.tpl.php on line 75</programlisting>
|
|
|
|
|
|
</example>
|
|
|
|
|
|
|
|
|
|
|
|
<para>
|
2004-09-22 14:55:51 +00:00
|
|
|
|
Quando voc<6F> encontra um erro de an<61>lise do PHP, o n<>mero da linha do erro corresponder<65> ao
|
2004-03-28 15:24:19 +00:00
|
|
|
|
script PHP compilado, n<>o o template em si. Normalmente voc<6F> pode no template localizar o
|
|
|
|
|
|
erro de sintaxe. Aqui algumas coisas para voc<6F> procurar:
|
|
|
|
|
|
falta de fechamento de tags para {if}{/if} ou
|
2004-09-21 15:05:45 +00:00
|
|
|
|
{section}{/section}, ou erro de l<>gica dentro de uma tag {if}.
|
|
|
|
|
|
Se voc<6F> n<>o conseguir encontrar o erro, talvez seja necess<73>rio abrir
|
|
|
|
|
|
o arquivo PHP compilado e ir at<61> o n<>mero da linha exibido, para saber
|
|
|
|
|
|
onde se encontra o erro correspondente no template.
|
2004-03-28 15:24:19 +00:00
|
|
|
|
</para>
|
|
|
|
|
|
</sect1>
|
|
|
|
|
|
</chapter>
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
|
|
Local variables:
|
|
|
|
|
|
mode: sgml
|
|
|
|
|
|
sgml-omittag:t
|
|
|
|
|
|
sgml-shorttag:t
|
|
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
|
|
sgml-indent-step:1
|
|
|
|
|
|
sgml-indent-data:t
|
|
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
|
|
sgml-parent-document:nil
|
|
|
|
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
|
|
End:
|
|
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
|
|
-->
|