PHP command line syntax checking

The PHP CLI (command line interface) allows basic syntax checking of a PHP file. I’ll show the basic usage of this in this post and then a couple of ways to check all files in a directory, and all files recursively down the directory tree as posted by a couple of people on Twitter.

Categories PHP

Disable PHP in a directory with Apache .htaccess

If you have a directory which users can upload files into it’s a good idea for security reasons to disable server-side parsing of scripts such as PHP. This post shows a couple of options using Apache’s .htaccess files.