ravix76 Posted July 14, 2007 Share Posted July 14, 2007 I want to include the following text in a string for ultimate writing to a file. "<?php virtual('/phpincs/stats.php'); ?>" Trouble is, PHP sees the ?> even though it's inside quotes and stops processing php. How do I avoid this? Cheers Ravix Link to comment https://forums.phpfreaks.com/topic/59982-in-a-string/ Share on other sites More sharing options...
metrostars Posted July 14, 2007 Share Posted July 14, 2007 htmlentities('<?php virtual(\'/phpincs/stats.php\'); ?>'); Link to comment https://forums.phpfreaks.com/topic/59982-in-a-string/#findComment-298334 Share on other sites More sharing options...
logged_with_bugmenot Posted July 14, 2007 Share Posted July 14, 2007 this one will also work "/</?php virtual/(/'//phpincs//stats.php/'/)/; /?/>" Link to comment https://forums.phpfreaks.com/topic/59982-in-a-string/#findComment-298343 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.