rhyspaterson Posted May 29, 2007 Share Posted May 29, 2007 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 >.<) Quote Link to comment https://forums.phpfreaks.com/topic/53427-solved-file_get_contents-expects-at-most-3-parameters-5-given/ Share on other sites More sharing options...
Diego17 Posted May 29, 2007 Share Posted May 29, 2007 You are using php version < 5.1.0 Quote Link to comment https://forums.phpfreaks.com/topic/53427-solved-file_get_contents-expects-at-most-3-parameters-5-given/#findComment-263982 Share on other sites More sharing options...
rhyspaterson Posted May 29, 2007 Author Share Posted May 29, 2007 Ah crap, it's PHP Version 5.0.4. I thought it was above 5.1.0 Sorry lads. Cheers. Quote Link to comment https://forums.phpfreaks.com/topic/53427-solved-file_get_contents-expects-at-most-3-parameters-5-given/#findComment-263985 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.