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
https://forums.phpfreaks.com/topic/111288-solved-fopen-to-new-directory/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.