Форум: Форум PHPФорум ApacheФорум Регулярные ВыраженияФорум MySQLHTML+CSS+JavaScriptФорум FlashРазное
Новые темы: 0000000
PHP. Практика создания Web-сайтов (второе издание). Авторы: Кузнецов М.В., Симдянов И.В. PHP 5. На примерах. Авторы: Кузнецов М.В., Симдянов И.В., Голышев С.В. Самоучитель PHP 5 / 6 (3 издание). Авторы: Кузнецов М.В., Симдянов И.В. C++. Мастер-класс в задачах и примерах. Авторы: Кузнецов М.В., Симдянов И.В. Программирование. Ступени успешной карьеры. Авторы: Кузнецов М.В., Симдянов И.В.
ВСЕ НАШИ КНИГИ
Консультационный центр SoftTime

Форум PHP

Выбрать другой форум

 

Здравствуйте, Посетитель!

вид форума:
Линейный форум Структурный форум

тема: 2 разных результатна на 2х разных серверах, почему?
 
 автор: fxsektor   (08.10.2007 в 16:50)   письмо автору
 
 

Одну CMSку пытаюсь гонять на 2х серваках:
1. denwer: apache+php+mysql
2. apache+php+mysql на ОС Slackware

на №1 все работает изумительно, на №2 выдает следующий текст:

template_name = $filename; if(file_exists("themes/$this->template_name/template.tpl")) { $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $stime = $mtime; include_once("themes/$this->template_name/template.tpl"); $templates_names = array("opentable", "closetable", "opentable2", "closetable2", "themeheader", "themefooter", "modtitle","themenewspoll", "themenewshome", "themenewsview", "themeleftbox", "themerightbox", "themecenterbox", "thememessagebox", "themecomments", "themecommentsform", "themebbcodes", "themesmiles", "themebanned", "themestyle", "themearticlesview","themenewsprint"); foreach($templates_names as $name) { $this->templates["$name"]=$$name; } $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $etime = $mtime; $ttime = ($etime - $stime); $this->loadtime=$ttime; $this->loaded=true; } else { echo _INDEX46; die(); } } /** * sets array of tokens to replace * * @param array $find */ function set_find($find) { $this->find=$find; } /** * sets array of strings to replace tokens * * @param array $replace */ function set_replace($replace) { $this->replace=$replace; } /** * returns parsed template * * @param string $name * @return string */ function parse($name) { if ($this->loaded) { $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = (float)$mtime[1] + (float)$mtime[0]; $stime = $mtime; $s=str_replace($this->find,$this->replace,$this->templates["$name"]); preg_match_all("'{php:(.*)}'",$s,$blckname); foreach($blckname[1] as $blckfile) { $find = "{php:".$blckfile."}"; ob_start(); eval($blckfile); $content=ob_get_contents(); ob_implicit_flush(); ob_end_clean(); $replace=$content; $s=str_replace($find,$replace,$s); } $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = (float)$mtime[1] + (float)$mtime[0]; $etime = $mtime; $ttime = ($etime - $stime); $this->parsetime+=$ttime; return $s; } } /** * returns unparsed template * * @param string $name * @return string */ function get($name) { if ($this->loaded) { return $this->templates["$name"]; } } /** * returns template load time * * @return string */ function getloadtime() { return substr($this->loadtime,0,7); } /** * returns template parse time * * @return string */ function getparsetime() { return substr($this->parsetime,0,7); } } ?>

вопрос: чего не хватает?

   
 
 автор: sim5   (08.10.2007 в 16:58)   письмо автору
 
   для: fxsektor   (08.10.2007 в 16:50)
 

Ребус длинный, но попробую отгадать. В самом конце:
echo "Приехали!";
Угадал?

   
 
 автор: bronenos   (08.10.2007 в 17:00)   письмо автору
 
   для: fxsektor   (08.10.2007 в 16:50)
 

начало кода не с <? а с <?php

   
Rambler's Top100
вверх

Rambler's Top100 Яндекс.Метрика Яндекс цитирования