Page 1 of 1

Fatal error: Cannot redeclare class

Posted: Wed Feb 18, 2009 1:07 pm
by granite
Hey, brows!

I'm with problems with a class. Its name is "class.conf.php".

I get this error: "Fatal error: Cannot redeclare class conf"

Here goes the code:

Code: Select all

<?
 
class conf{
 
   var $DB_USER="sis_pes_adm";
   var $DB_HOST="localhost";
   var $DB_PASS='b3|V||>^|V735';
   var $DB_BASE="sis_autores";
   var $SEMENTE_SEGURANCA='esl)(-_';
   var $SEMENTE_SEGURANCA2='6X@{/el,Dw!gP2fzh';
   var $B_ADMIN='K9Nxt.K####@@@!!!eFzYae^';
   var $C_ADMIN='#2edce93/*/*/09e39586b01#';
   var $DB_TABELA;
   var $DB_CAMPOS;
   var $DB_resultado;
   var $DB_RESULTADOS;
   var $lista;
   var $conn;
   var $EST_PARAMETROS;
   var $LOG_ARQUIVO="../log/log_erros.txt";
   var $uploaddir="../imagens/produtos/";
   var $img_tipos=array("foto");
   var $perm_tipos=array("jpg","jpeg","gif");
 
   function conf(){
 
   }
 
}
 
?>
Can someone help me, please?

Thanks. :)

Re: Fatal error: Cannot redeclare class

Posted: Wed Feb 18, 2009 1:47 pm
by requinix
Somewhere you're including or requiring this file. Use include_once or require_once instead.

Re: Fatal error: Cannot redeclare class

Posted: Wed Feb 18, 2009 2:09 pm
by granite
Hm, ok, I solved this. I had two classes with the same name. :oops:

Thank you, tasairis. :)