You could use the PHP file manipulation. i.e. create your own version of a string builder to create the files for you.
This could be more hassle than it's worth. I would suggest an IDE with robust error-checking and all the rest of it and then FTP, but having tested it on a test server first, however I do see the attraction. If you have a team working on the site, you can use check-in and check-out.