Jump to content

Error opening a file with php!


pthurmond

Recommended Posts

Hey everybody, I am getting an error opening a file with php. This file is a template that I am trying to replace placeholders with variables.

Here is the error:
[quote]
<br />
<b>Warning</b>:  file_get_contents(participants.rtf): failed to open stream: No such file or directory in <b>/home/content/p/a/l/paldata/html/TeamB/includes/file_funcs.php</b> on line <b>81</b><br />
[/quote]


Here is the code:
[code]
header( 'Content-type: application/msword' );
header( 'Content-Disposition: inline, filename=Participant_Release.rtf');

// open our template file
$filename = 'participants.rtf';
$output = file_get_contents($filename);
[/code]


Line 81 in the error is the last line of code above. The file is on the server in the exact same folder with the same exact spelling and capitalization.

Any ideas?

Thanks,
Patrick
Link to comment
https://forums.phpfreaks.com/topic/29632-error-opening-a-file-with-php/
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.