akrytus Posted August 9, 2006 Share Posted August 9, 2006 Perhaps I expect to much, but is it possible to create a webpage that works like an index? List all the directories and files and be able to click on a directory to browse it and to click on a file to download it while all being held in a scroll box within the page to keep the page from having to scroll? Any sample code or ideas would be appreciated. Thanks! Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted August 9, 2006 Share Posted August 9, 2006 indeed you can do this - its not too difficult...you will need to know opendir(), readdir(), closedir().loop through the directory using read_dir() if its a directory then gen a link to run script again with the new directory the root folder its looking in, if a file generate a link to download/view.as far as the html goes...<div style="height: 400px; over-flow: auto;">//stick you links in here...</div> Quote Link to comment Share on other sites More sharing options...
akrytus Posted August 9, 2006 Author Share Posted August 9, 2006 Sounds good, but how do you create a script that would run on a mouse click to change the dir. I would naturally try to have the php chr_dir command run on a java onClick but, I have found the php will run immediately without the java script running first. Do you have an idea how I can get the script to run on the click, without using a form? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.