mr_mind Posted December 8, 2007 Share Posted December 8, 2007 I have a function that looks like this: function load_module($module) { $module_contents = file_get_contents("/var/www/localhost/htdocs/new/inc/modules/" . $module . '.php'); return $module_contents; } but now i need to parse the file that is being called. right now i just see the text that is in the file Link to comment https://forums.phpfreaks.com/topic/80776-solved-parse-the-contents-of-a-file/ Share on other sites More sharing options...
Sulman Posted December 8, 2007 Share Posted December 8, 2007 It will help if we know what you want to extract from the file Link to comment https://forums.phpfreaks.com/topic/80776-solved-parse-the-contents-of-a-file/#findComment-409720 Share on other sites More sharing options...
wildteen88 Posted December 8, 2007 Share Posted December 8, 2007 I have a function that looks like this: function load_module($module) { $module_contents = file_get_contents("/var/www/localhost/htdocs/new/inc/modules/" . $module . '.php'); return $module_contents; } but now i need to parse the file that is being called. right now i just see the text that is in the file If you want to parse that contents the php file you'll need to use a http address and not a local address eg: $module_contents = file_get_contents("http://localhost/new/inc/modules/" . $module . '.php'); Link to comment https://forums.phpfreaks.com/topic/80776-solved-parse-the-contents-of-a-file/#findComment-409732 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.