hackalive Posted April 9, 2010 Share Posted April 9, 2010 I need a way to get the contents of a PHP file into an array eg $string = '<?php echo "This was one page";?>'; any ideas? even if I have to implode an array, but it MUST be the php file not as if it has been processed into HTML Quote Link to comment https://forums.phpfreaks.com/topic/198105-read-php/ Share on other sites More sharing options...
oni-kun Posted April 9, 2010 Share Posted April 9, 2010 $phpcode = file_get_contents('./foo.php'); print $phpcode; Why not test and view source? (FF may hide <? tags). And what exactly do you mean array? Quote Link to comment https://forums.phpfreaks.com/topic/198105-read-php/#findComment-1039415 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.