First i don't know about locking the web folder and prevent them from looking into it but..
As most of Applications do, read these steps:
- First the Legal protection:
1- make a Contract with a good lawyer to protect your work and money
2- Register your source code in a Rights Protection organizations.
- Second Source Code protection:
1- usually depending on JAVA or C#.NET for the Compiler to byte code or lower and its VM sandbox / Framework. but in PHP it's an interpreter language that supports open source.
2- you can mix Java/c# with php by making a small web application to link the server hardware serials (like hdd / motherboard serial / available mac address / Operating system installation date) in encrypted hidden place to prevent stalling your files to run on another machines.
3- Mixing PHP with a compiled language means also to make part of your site (logics) in a compiled language and the php are depends on it so you'll prevent coping them by normal way.
4- you can buy a Dongle usb for the previous purpose like (sindbad protection)
5- Encrypt the remaining part of your PHP files for less secure to prevent the read of them using one of those tools
A) free and working PHP obfuscators:
http://www.pipsomania.com/best_php_obfuscator.do
http://www.phpprotect.info/
B) Encode the source files by one of them:
http://php.net/manual/en/function.blenc-encrypt.php
http://www.showmycode.com/
http://phpshadow.com/
http://dezender.net/
http://www.zend.com/en/products/zend-guard
http://www.ioncube.com/php_encoder.php