Re: [PHP] How to make Browse Folder Dialog



Aslam Bari wrote:

Hello,
Just a minute. I know the php script will run on server. Suppose i m working
on server machine and i need to make a project for myself. The machine is
only one and same. Also there are a lot of file and directory methods
available in PHP, Whats that? Actually i want to show the files of selected
folder on screen.
Thanks...


Yes, PHP has file handling functions for use on the server it is running
on. As long as we're clear that it can't touch the filesystem of the
user of the application :D

If you just wanted to make a list of folders and let them select one you
could build the list using an HTML SELECT box. Once they have selected
an item and click on submit, you would use similar code that you used to
populate your directory list to show a list of all files in that directory.

The code at Example 2 on the php.net readdir documentation is probably
one good place to start: http://www.php.net/readdir

A hint from another thread today to save yourself trouble: Always use
full paths when working with files.

T
.



Relevant Pages

  • Re: Dealing with PHP Files
    ... Dudley Henriques wrote: ... You can save any web page in Firefox, Command + S. If a web page has a .php ending this just means that the document that was loaded to the server had php code in it that he wanted parsed. ... The .php ending lets the server know to parse the php code in it There are other ways too). ... make a folder and put in the .php file and the folder with the images and maybe other things that FF made. ...
    (comp.sys.mac.apps)
  • Re: Dealing with PHP Files
    ... had php code in it that he wanted parsed. ... the server know to parse the php code in it There are other ways ... TextWrangler and save it as .html rather than .php, ... file and the folder with the images and maybe other things that ...
    (comp.sys.mac.apps)
  • Re: Dealing with PHP Files
    ... You can save any web page in Firefox, Command + S. If a web page has a .php ending this just means that the document that was loaded to the server had php code in it that he wanted parsed. ... The .php ending lets the server know to parse the php code in it There are other ways too). ... If you go the source of the webpage via your browser, you will just see a text file with html mark up. ... make a folder and put in the .php file and the folder with the images and maybe other things that FF made. ...
    (comp.sys.mac.apps)
  • Re: Jumping to a page back: ... --> solution !?
    ... Not as neat as PHP, ... A third way is to use Server Side Includes. ... Create a new folder and call this whatever you ... In all your html files at the ...
    (alt.html)
  • Re: Test Server to Live server - best way of handling different file paths in scripts?
    ... > I have taken over someone else's PHP code and am quite new to PHP. ... All the PHP scripts start ... > folder as any folder that contains scripts that actually calls another ... > require for that server. ...
    (comp.lang.php)