View Single Post
Old 05-28-2004, 01:21 PM   #5 (permalink)
cthulu23
Banned
 
cthulu23's Avatar
 
Quote:
Originally posted by k_day64
I dont like the thought of ppl knowing my dir structure becasue it is based of the FTP users and I dont want their logins know.

~k_day64
You can use PHP's directory functions to open any directory that the webserver user has read access to, including dirs outside of the web root. Open a directory, get a listing of files, then return that listing without naming the directory. If you're worried about your interpreter going belly up and spewing out your raw code (with file paths and all), you can also put your directory parsing functions in a file outside of your web root and "include" that file in your script. Even if your PHP code is readable, they'll get no directory names.

Hopefully I understood your concerns and this advice is helpful.
cthulu23 is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73