how can i make an interface in php script to generate a directory tree, like in windows or another OS.
Read about the function opendir() in the PHP manual. With it you can get a list of all items in a certain directory. I guess, if you recursively used this function you could generate a tree view.
There are many snippets of code to achieve this in the user notes for the readdir() function. http://www.php.net/readdir