Is there a way to check syntax of a file with a PHP function (ie. not from the command line). I have some code that creates a php file and I would like to verify the syntax automatically as soon as it is created.
Thanks!
Upload it to a server and see if you get parse errors?
or
error() for PHP die(mysql_error()) for MySQL
Hum. Cant find any php function error(). Because the code generates a bunch of PHP files, I don't want to check each one by hand each time I run this Meta-script.
Originally posted by Kudose Upload it to a server and see if you get parse errors? or error() for PHP die(mysql_error()) for MySQL
http://www.php.net/manual/en/function.strlen.php
Thanks for you help, but streln just gets the length of a string, even if I use it to find the lenght of my files that won't tell me if the syntax is valid.
Yeah, I accidently posted the wrong link.
Sorry.