Alchemy Posted December 6, 2006 Share Posted December 6, 2006 Working on a templating class.... and everything works fine, but when I used this part of the class[code]<?php // Replace the <DYNAMIC BLOCK "page.php"> tags with the desired page $rep = array("<?","?>","<?php","php?>"); $this->Template = preg_replace("/\<DYNAMIC BLOCK \"(.*?)\"\>/e", 'eval(str_replace($rep,\'\',file_get_contents($site[\'phys\']."blocks/\\1")))', $this->Template);?>[/code]If works fine, but... the page it just pulled gets positioned at the very beginning of the page instead of where it got pulled from.... Link to comment https://forums.phpfreaks.com/topic/29735-preg_replace-to-include-external-page-returns-at-top-help/ Share on other sites More sharing options...
trq Posted December 6, 2006 Share Posted December 6, 2006 Sorry, but your post makes little sense. Link to comment https://forums.phpfreaks.com/topic/29735-preg_replace-to-include-external-page-returns-at-top-help/#findComment-136515 Share on other sites More sharing options...
Alchemy Posted December 7, 2006 Author Share Posted December 7, 2006 That peice of code replaces <DYNAMIC BLOCK "page.php"> with the actual code from page.php.BUT for some reason it returns the information at the very top of the page displayed. Link to comment https://forums.phpfreaks.com/topic/29735-preg_replace-to-include-external-page-returns-at-top-help/#findComment-136876 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.