Re: Making sure an include file works

From: Date: Fri, 29 Feb 2008 04:17:45 +0000
Subject: Re: Making sure an include file works
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-270695@lists.php.net to get a copy of this message
On Thu, Feb 28, 2008 at 7:50 PM, Robert Cummings <robert@interjinn.com> wrote: > > On Thu, 2008-02-28 at 18:58 -0800, Richard S. Crawford wrote: > > I'm trying to figure out a way to make sure an included PHP file has no syntax > > errors before actually including it as a part of project. Is this even > > possible? I'm running into brick walls. > > I don't believe there is a function to do this. What can be done though > is to call the cli binary with the -l flag and have the file syntax > checked that way. > > php -l /path/to/the/source > > It wouldn't be very fast though as a solution. > > Cheers, > Rob. > -- > .------------------------------------------------------------. > | InterJinn Application Framework - http://www.interjinn.com | > :------------------------------------------------------------: > | An application and templating framework for PHP. Boasting | > | a powerful, scalable system for accessing system services | > | such as forms, properties, sessions, and caches. InterJinn | > | also provides an extremely flexible architecture for | > | creating re-usable components quickly and easily. | > `------------------------------------------------------------' > > > http://us.php.net/manual/en/function.php-check-syntax.php -- -Casey

« previous php.general (#270695) next »