i am trying to send email from php i have one php file with all values & other php template file.
(both files are on same server)
i am using file_get_co
Here's an alternative solution... Use the relative path or absolute path as suggested by "cballou" to read file.
But insted of wirting a php file use a simple text file put you message template in it replace with something unique like
%uname%
(replacement keys).
Read the file content into a variable and replace the replacement keys with your variable like so,
$url = "/usr/local/path/to/email_form.txt";
$a = "uname";
if(($Content = file_get_contents($url)) === false) {
$Content = "";
}else{
$content = str_replace('%uname%', $a, $content);
}