Jump to content

$fp = fopen("emails.txt", "w"); but not in same folder where php is located


nightkarnation

Recommended Posts

Hey guys!

I have the following doubt:

 

I have a php file that does the following alongside with other code not displayed here:

 

$fp = fopen("emails.txt", "w");

 

It opens a txt file called emails.txt that is in the same folder where the php is saved but how do I tell $fp = fopen("/folderbefore/emails.txt", "w"); ??

 

In other words, how do I write the path on the script that the emails.txt is located in a previous folder where the php file is located??

 

Thanks in advance for your help

Cheers!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.