Hey all, I'm sorry I have to bug you guys with what is probably a very easy-to-answer question, but Google isn't being very friendly with my queries on this one. I just want to know how to set a variable equal to the contents of a particular file, like in the following (non-functional) example:
$var = include('file.php')
I'm trying to create a form mailer that uses templates.
Thanks!
Setting a variable equal to contents of a file
Moderator: General Moderators
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
file_get_contents()
It's listed in the "filesystem" section of the manual: http://www.php.net/manual/en/ref.filesystem.php
Cheers,
Kieran
It's listed in the "filesystem" section of the manual: http://www.php.net/manual/en/ref.filesystem.php
Cheers,
Kieran