Jump to content

[SOLVED] fopen to new directory


trampolinejoe

Recommended Posts

Hey guys, ;D

 

I have some code, I need to save txt files to a certain folder on my web server where by my other software reads and opens the txt on my local server via a shared mapped ftp network drive.

 

Here is the problem:

 

$ourFileName ='/storage/'.$connote.'.txt';

 

$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file, something broke!");

 

 

 

I am trying to have it store in the sub folder called /storage/

The message it is giving me is:

"failed to open stream: No such file or directory in"

 

 

Points:

- I have made sure that the directory is on the server

- I have tested $ourFileName =$connote.'.txt'; which works

 

 

I am a newbie to the fopen function and php so I wouldnt mind the help

 

Cheers Guys

 

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.