Is it possible to open the file within directories

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vinoth
Forum Contributor
Posts: 113
Joined: Thu Aug 02, 2007 3:08 am
Location: India
Contact:

Is it possible to open the file within directories

Post by vinoth »

Hi all Peoples.

I am trying to write some contents on the file.
The file was present on some other directory.
Is it possible to open the file in some directory Using fopen()
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

Yes, granted the file has sufficient permissions in the mode you're trying to open it in. If I understand your question right you want to open a file that's in a different directory. You can either use an absolute path like /home/me/public_html/path/to/file.php or a relative path if the file is navigable from the current directory.. path/to/file.php.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
vinoth
Forum Contributor
Posts: 113
Joined: Thu Aug 02, 2007 3:08 am
Location: India
Contact:

Post by vinoth »

Thanks scottayy

Its working fine
Post Reply