Участник

Зарегистрирован: Feb 2003
Место проживания: Москва
Публикаций: 9
Статус:  |
Spawnn
quote: и еще...
у меня постоянно пишет в error_log
Undefined variable: templatesused in mainfile.php on line 47
я посмотрел, вроде ничего серьезного в этом нет.
это действительно так?
Ð_то происходит из-за того, что эти переменные используются раньше, чем происходит подключение require
Была такая фигня и у меня, решилась очень просто - переносом обращений к ним чуть ниже. Например вот так:
PHP:
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$starttime = $mtime;
$mainfile = 1;
require_once("config.inc.php");
require_once("config.php");
chdir($vbpath ."/");
// include($vbpath . "/global.php");
// bug fix for php4.3.0
require_once($vbpath . "/global.php");
// This was in case we decide to add a table for all or some the config vars.
// $config=$DB_site->query_first("SELECT template FROM P_template WHERE title='options'");
// eval($config['template']);
$templatesused. ='P_top10module,P_top10module_row,P_top10module_su btitle,P_recent_classifieds';
$templatesused. =',P_activetopic_centerbox,P_activetopic_centerbox bit,P_breadcrumb,P_downloadbits,P_downloadscategor y,P_downloadscenterbox,P_home,P_linksbits';
$templatesused. =',P_linkscategory,P_linkscenterbox,P_newsbits,P_n ewthreadheader,P_ratearticle,P_showarticle,P_showa rticlebits,P_showarticle_all,P_showarticle_comment bits';
$templatesused. =',P_showarticle_commentbox,P_showarticle_replybox ,P_themecenterbox,P_thememenu_downloads,P_thememen u_faq,P_thememenu_forum,P_thememenu_homepage';
$templatesused. =',P_thememenu_undefined,P_thememenu_weblinks,P_th ememodulebox_bottom,P_thememodulebox_top,P_themene wsbox,P_themerightcolumn,P_themesidebox_right';
$templatesused. =',P_error_nopermission_loggedout,maxloggedin,newp ost_attachment,showpost';
Сообщить модератору об этом сообщении | Предупреждение | IP: определен
|