将php与xhtml链接

Hey guys quick silly question but i cant for the life of me remember how to do it

i have a php file and i want it to link in with a xhtml file so it runs at the start of the page load up, the php it LDAP authentication and i want this to be successful before a user goes to the page

thanks !

do you mean something like

require_once('/path/to/your/file.php');

You mean LDAP authentication using PHP? Look at this example:

http://code.activestate.com/recipes/101525-ldap-authentication/

If user is not authenticated, show html form, ask for credentials, if it is authenticated, show your xhtml