JREAM Posted September 9, 2008 Share Posted September 9, 2008 Im stuck again <?php // Debuggin ini_set('display_errors', 1); error_reporting(E_ALL); // $file = include('cms/data/blocks/block-1.php'); str_replace("###", '>>', $file); ?> heres what in the file: block 1, blah blah <br /> ### <br /> ### something ### <br /> test ### test <br /> Link to comment https://forums.phpfreaks.com/topic/123385-why-wont-str_replace-work/ Share on other sites More sharing options...
JasonLewis Posted September 9, 2008 Share Posted September 9, 2008 If you want to get the contents of a file you need to use file_get_contents(). include() does not return the contents of a file and assign them to a variable. Link to comment https://forums.phpfreaks.com/topic/123385-why-wont-str_replace-work/#findComment-637283 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.