Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

$filename

Status
Not open for further replies.

patweb

Programmer
Apr 17, 2003
174
0
0
BE
$filename = "
I use a hard coded url and file name to open this file and insert his content in a table = ok

next, i like to get the file under this dir (not longer a hard coded name), the file name is variable, because the clients are uploading this file, always with their own named file, any id on how to read a variable or the dir to get the $filename ?
 
If the file resides on the same server it is recommended to use the filesystem functions rather than involing a webserver subrequest.

What to you mean by this dir?
 
I understand that you are talking about a directory. The question still is very unclear, I can only guess what you want.

If you want to list the contents of the dir in which the test.txt is using HTTP: you have to rely on the web servers' directory listing, if turned on.

If you are on the same server you can use the directory functions or glob() through the filesystem to ascertain the content of any folder the web server user has access to.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top