#5 How XPC works

API
open
API (7)
5
2001-06-06
2001-06-06
No

XPC works by using simple Apache directives with
a .htaccess file in the root folder of the web servig
directory.

This htaccess file tell s the directory and its
descendants to force/type-application-PHP

We also specify the DirectoryIndex as being a file
with no extension.

This file will then be required on every URI request
in this folder.

This file should be a name related to the web sites
(search rankings) It acts as the XPC buffer and
appears to be a directory in the browser.

If I was a web designer I might name my XPC file
clients, accounts, or projects.

Therefore, a URL would look like this:
http://mysite.com/accounts/

Any URI request beyond that must match up with data in
a SQL table row. If there isn't a match a default 404
page is displayed. Or a search query can be run on the
URI_REQUEST to see if we have a match somewhere else.

When this URL is run http://mysite.com/accounts/
the accounts file will perform certain validation
fucntions and resultant includes and outputs that
match.

XPC validation functions include:
currentDomain
currentPage
pageStatus (public or private)
pageAccess (page editing rights (for admins))
pageMode (The mode in whcih we output our page defiend
SQl data (HTML,PHP,TEXT))
curDir (current Directory if any)
curSubDir (current subdirectory if any)
if pageTpl ISSET else siteTpl (our default Template is
sent to be included).

Discussion


Log in to post a comment.