All you have to do is to activate the apache webserver (System preferences -> Sharing -> Services -> Personal Web Sharing).
But before you do that you need to edit your http.conf file to include the php modules:
- find the file /etc/httpd/httpd.conf
- open that using your favourite text editor
- find these lines (line number may vary slightly) and remove the '#' to uncomment/
240: #LoadModule php4_module libexec/httpd/libphp4.so
284: #AddModule mod_php4.c
- exit and save the http.conf file (should require authentification and/or admin password)
- (re)start the Personal Web Sharing and access whatever is in your ~/Sites/ folder on http://localhost/~yourname/