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 Quote Link to comment 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 Quote Link to comment 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'); Quote Link to comment 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.