Matt79 Posted January 7, 2010 Share Posted January 7, 2010 I have my website setup so I can edit it with a web browser. The way I have it set up is I include the file that I want to edit inside of an HTML textarea. The only problem is the page that I am going to edit is already processed by php. So is there a simple way to have a php file sent to the web browser without PHP processing it? Link to comment https://forums.phpfreaks.com/topic/187610-includebut-unprocessed/ Share on other sites More sharing options...
lemmin Posted January 7, 2010 Share Posted January 7, 2010 I'm not sure if it will work with your setup, but you might be able to just echo the contents of the file instead of including it: <?php //if file is php: echo file_get_contents("file.php"); ?> Link to comment https://forums.phpfreaks.com/topic/187610-includebut-unprocessed/#findComment-990525 Share on other sites More sharing options...
teamatomic Posted January 7, 2010 Share Posted January 7, 2010 file_get_contents then echo it with single quotes so no vars get extrapolated. You could also if you want replace the $ with \$. Then reverse it when writing it back. HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/187610-includebut-unprocessed/#findComment-990527 Share on other sites More sharing options...
Matt79 Posted January 7, 2010 Author Share Posted January 7, 2010 Thanks guys the echo file_get_contents("file.php"); did the trick. I am a network person, so I have yet to learn all of the tips and tricks. Link to comment https://forums.phpfreaks.com/topic/187610-includebut-unprocessed/#findComment-990613 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.