This can be done very easily.
The python way:
The PHP way:
Both serves file in the current directory. The example port
8000 can be change to suit your needs.