Greetings...I hope someone can help me... usually you coders rock and help me reslolve these issues fast... THANKS!
Here is the problem. I made an HTML (and text, it didn't work either) template for an email sent to customers. .... anyway, I need to load the entire contents of template into a variable. Here is the code I was using (slightly modified for debuging and testing).
$fp = fopen($_SERVER['DOCUMENT_ROOT'] . "/templates/template.html", "r") or die (clearstatcache());
if (is_readable($fp)) {
echo "yes, file is readable";
} else {
echo "no, file is not readable";
};
$ourmsg = fread($fp, filesize($fp));
fclose($fp);
echo $ourmsg;
Every time I get, no file is not readable. So I am assuming that the file is being opened... it just isn't readable?? I don't need to echo the contents out immediately after, (I know readfile() does this)...I need to store the contents in a variable for later use in sending an email. Any ideas? Thanks in advance!