[SOLVED] php v 4.2.3 - file_get_contents gives error help!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sh33p1985
Forum Commoner
Posts: 78
Joined: Thu Mar 11, 2004 9:22 am

[SOLVED] php v 4.2.3 - file_get_contents gives error help!

Post by sh33p1985 »

does anyone know why when i try to use file_Get_contents("file"); it gives me an error call to undefined function?
sh33p1985
Forum Commoner
Posts: 78
Joined: Thu Mar 11, 2004 9:22 am

Post by sh33p1985 »

i did that comes up with error:

Warning: Wrong parameter count for join() in c:\phpdev\www\calc.php on line 3
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

It should be,

Code: Select all

function file_get_contents($file) { 
    return join("\n", file($file)); 
}
sh33p1985
Forum Commoner
Posts: 78
Joined: Thu Mar 11, 2004 9:22 am

Post by sh33p1985 »

works, thanks man!:P
Post Reply