PHP: How do I use the include() function?

If the PHP file is in the same directory as the HTML file, then you can just call the file:

include("file.html");

If it's in a different directory, then you will need to specify either the full path, or the relative path:

include("pages/file.html");
or
include("c:/www/pages/file.html");
 
A is the correct way to do it, unless the php file your using the function on is IN the somefolder/ in which you'd just use B
 
Back
Top