copy it to router using ftp, run it using telnet
something like ./thttpd-php4f_2.21b-2_mipsel -p 81 -d yoursourcefolder

put some php files in the source folder, give them enough rights (get up stand up!) and learn how to use php.