rik72 Posted November 21, 2007 Share Posted November 21, 2007 Having issues with the following code, the file does exist but im getting no error messages! <?PHP if (!defined("LOAD_AS_MODULE")) { module_error("permissiondenied"); exit(); } $temp = load_template("main-content-news"); $newsbit = get_include_contents('modules/m_news/show_news.php'); function get_include_contents($filename) { if (is_file($filename)) { ob_start(); include $filename; $contents = ob_get_contents(); ob_end_clean(); return $contents; } return false; } function module_main() { $conte .= str_replace("", $newsbit, $temp); return $conte; } ?> Quote Link to comment Share on other sites More sharing options...
Wes1890 Posted November 21, 2007 Share Posted November 21, 2007 ^ your getting no error message? was that a typo? if you get an error message, please post it. also, try putting the include-file in the same directory as the script and see if it works Quote Link to comment Share on other sites More sharing options...
premiso Posted November 21, 2007 Share Posted November 21, 2007 Make sure display_errors is turned on and error_reporting is set to E_ALL to make sure that errors are suppose to display. Also, you are not checking if get_include_contents is returning false, which it could be. A lot of unknowns I suggest trying that first. 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.