gkchicago Posted March 23, 2006 Share Posted March 23, 2006 Hello, I am using php to do some CLI scripting and in the interest of code-reuse I'm trying to include a php file I've already written into a new script.. Problem is that it was written as a CLI application with the shebang (#!/usr/bin/php -q) at the top. Because the php of the including script reads this as outside the php code it is printed to the command line at the moment the file is included. Is there some way to suppress this output? Quote Link to comment Share on other sites More sharing options...
gkchicago Posted March 23, 2006 Author Share Posted March 23, 2006 Got it, will probably write a wrapper function for this:[code]ob_start();include('file.php');ob_end_clean();[/code] 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.