Re: Making sure an include file works

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 6:58 PM -0800 2/28/08, 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'm not sure if this is what you are asking for, but occasionally I have an include file that just brings functions and sometimes I want to know if that file has any errors in it.

As such, I simply add echo('a'); at the beginning of the file. If I run the script that includes that include and see an 'a' printed at the top of the page, then I know that the include has no syntax errors. Then it's simple to comment out that line.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux