Just picked up PHP after months of postponement.
Just not to dampen my learning mood too early, I started out with a simple pet project: A file listing page.
Have a look here: http://cardboardbox.felixleong.com/
It's not really something to scream about, it's just simple enough for me to let it auto generating a file listing for people to grab stuff from my cardboard box, which I use to dump temporary stuff for friends to download.
But it did took me about 4 nights to complete this 120+ lines of code. Most of the time spent is to avoid people from exploiting/compromising my script, especially the fact that I REALLY don't want my script to expose my root directories.
So essentially the checking I have done:
- get the absolute path of my cardboard box folder,
- obtain the requesting directory name from the user (if they typed it on the address bar) and translate it into another absolute path
- Compare the user's request absolute path and check against the cardboard box folder absolute path, to see whether the request looks within my cardboard box folder and no where else
But I'm starting to get the hang of PHP. I'm going to work on another PHP pet project of a larger scale now :).
---
In other news, I'm having plans to migrate this blog over to FelixLeong.com. I now have WordPress installed and configured at my server, now I'm still working on the theme for it. I'll announce once I got everything settled and moved.
[Edit: Fixed a couple of bugs just now ^-^"]
Tuesday, December 20, 2005
[PHPExp] First Pet Project :)
Labels:
PHP
Posted by Felix Leong at 11:23 pm
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment