Holthelper, the '^' character in his preg_replace means 'everything except' in PHP's REGEX. So he's stripping out 'everything except' [a-zA-Z0-9 \._-]. He desperately needs that, as Theoretical, in so little words, explained.
@OP,
Oh you want to get the file as a string, and use stripslashes on that. But wait, do the quotes show as:
?
If ", use html_entities_decode(), if it has a slash in front, use stripslashes. The file shouldn't have slashes unless you added them when you created the file :/ Which is unnecessary, btw. Same thing with html_entities_decode shouldn't be needed unless you used htmlentities() on the file beforehand.
Oh, and you need to make the file a string via file_get_contents():
PHP Code:
echo html_entities_decode(file_get_contents($file));
// Or..
echo stripslashes(file_get_contents($file));