PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
And the above code will work. Now here's what I want. I want to somehow embed the code:
<html>
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
This is only a test.
</body>
</html>
into a .inc file or some other compatible file so I can do something like this:
$message = require("bodyCode.inc");
if it is possible. Is there a way to embed into the $message so I don't have show all the html code?
Yes. The body is html code because I want the email to be a html email format and not just plain texts. But the codes are too long and so I like to know if there is a better way to call the code back into the $message.
Many many thanks for your help but here is what I got when I used file_get_contents("filename.inc"). The error is: Fatal error: Call to undefined function: file_get_contents()
What is that mean? The reason I didn't specify a path is because the filename.inc is located on the main direcotry of the website.