|
-
Jun 9th, 2002, 01:01 PM
#1
Thread Starter
Hyperactive Member
read file
Using PHP
--------------
I have this folder on my web site
Mail
Public_html
Mail is folder that I recive my email on it
Public_html is folder that I must upload my site files to it
How can I read file using fopen function from Mail folder ?
If I use that
fopen ("/mail/file.txt")
it will read file from here (Public_html/Mail/file.txt) becuase Public_html is the root folder but I want read file from Mail folder.
Thanks
-
Jun 9th, 2002, 01:06 PM
#2
Member
You can do a chdir to change the working directory...
-
Jun 9th, 2002, 01:19 PM
#3
Stuck in the 80s
or you could just use the absolute path in fopen().
However, if you just want to read the file to a variable, just do:
$stuff = file("/path/to/your/file.txt");
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|