RSS Feed/News fopen with \XF\Util\File::getTempFile failing

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
23,691
Points
823

Reputation:

I am using code to try to open a temporary file to then use fputcsv to write into it and once completed I use copyFileToAbstractPath to copy the file over into the internal data.

The issue I am having is that I can not get fopen to open the temp file When I call the code it returns

Code:

fopen() expects parameter 1 to be a valid path, resource given

The code I am trying is

PHP:

Code:
$tempFileName = \XF\Util\File::getTempFile();
$csvTempFile = fopen($tempFileName, 'a');

This is almost...

Read more

Continue reading...
 
Status
Not open for further replies.
Top