Page 1 of 1

Strange behaviour of file_get_contents???

Posted: Wed Jul 27, 2005 3:16 am
by tores
Hi

Can someone tell me why I can't dump the string returned by file_get_contents? All I get is the length of the string, not the contents

Code: Select all

$contents = file_get_contents("configuration.php");
var_dump($contents);
outputs

Code: Select all

string(1045) &quote;&quote;
regards tores

Posted: Wed Jul 27, 2005 3:40 am
by tores
htmlspecialchars tok care of the output. I guess there was a problem outputting the php-tags in configuration.php

Code: Select all

var_dump(htmlspecialchars($contents));
regards tores