SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Thread: Can PHP do this?
-
May 24, 2004, 11:49 #1
- Join Date
- Mar 2004
- Location
- Tulsa, OK
- Posts
- 43
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Can PHP do this?
I'm wondering if PHP can read the location of a file off of a Local drive/directory, i.e. C:\temp\testfile.txt, put that location into a database field and then make the location a link when a query is run to list the files in that drive.
How would I go about doing something like this?? I've tried connecting to a local drive but I'm not sure about the syntax.
Thanks.
-
May 24, 2004, 11:59 #2
A server side script cannot read a local drive. Thats impossible.
THE INSTRUCTIONS BELOW ARE OLD AND MAY BE INACCURATE.
THIS INSTALL METHOD IS NOT RECOMMENDED, IT MAY RUN
OVER YOUR DOG. <-- MediaWiki installation guide
-
May 24, 2004, 12:06 #3
- Join Date
- Mar 2004
- Location
- Tulsa, OK
- Posts
- 43
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
What if the server is part of the same local network? Or if the drive is located on the same server? Like my server is on the W: drive and I'm trying to access things on another drive.
Are you saying that I can only access items that are under the root directory??
-
May 24, 2004, 12:09 #4
- Join Date
- Dec 2003
- Location
- va
- Posts
- 53
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Check this:
http://www.php.net/dir
The table of Contents has all the functions you need to write that code.
In the "user contributed notes" on that page, you can find a bunch of directory/file listing functions that will make your job a whole lot easier.
Hope this helped.
-
May 24, 2004, 12:12 #5
- Join Date
- Feb 2004
- Location
- Scottsdale, Arizona
- Posts
- 909
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Phil.Roberts
-
May 24, 2004, 12:37 #6
- Join Date
- Mar 2004
- Location
- Tulsa, OK
- Posts
- 43
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
yes Maxor, that is correct. thanks for clarifying.
Bookmarks