Jump to content

[SOLVED] file_get_contents() expects at most 3 parameters, 5 given


rhyspaterson

Recommended Posts

Hey guys,

 

Running this code:

 

$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];

$local_file = $DOCUMENT_ROOT . '/my/registrations/' . $_SESSION['$registrationID'] . '/profiles.txt';

$content=file_get_contents($local_file,FALSE,NULL,0,20);
echo $content;

 

And come out with the error PHP Warning:  file_get_contents() expects at most 3 parameters, 5 given.

 

Looking at the PHP manual and i thought the way to do it is..?

 

file_get_contents($local_file,FALSE,NULL,0,20);

 

This for starting at 0 and reading first 20 bytes.

 

Any suggestions = muchly appreciated!

 

(Google returns not help >.<)

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.