protected directory, also known as the application base path, is the root directory for holding pages, templates, configurations, data, etc. As its name indicates, the protected directory should be hidden from Web users, because files under this directory often contain sensitive data. Different Web servers have different ways of "protecting" a directory. For Apache httpd server, the easiest way is to place a file named .htaccess with the content deny from all under the directory.protected/runtime and assets directories are the two directories that must be set to "writable" by the Web server process. The runtime directory stores sensitive data (e.g., parsed application configuration) generated when running a PRADO application, while the assets directory stores published resources (e.g., image files, JavaScript files).pages directory is the root page directory holding all pages in a PRADO application. It is similar to the htdocs directory for the Apache httpd Web server. To access an arbitrary page located under pages, you can use the http://hostname/application/index.php?page=path.to.PageName URL. According to this URL, PRADO will look for a page named "PageName" under the directory pages/path/to. The URL you previously used to access the homepage is equivalent to http://hostname/application/index.php?page=Home.protected directory to somewhere else that is not a Web folder. To do so, use the following PHP statement to create the application instance in the entry script:
$application = new TApplication( 'path/to/protected' );
application.xml as follows:
<?xml version="1.0" encoding="utf-8"?>
<application id="blog" mode="Debug">
<services>
<service id="page"
class="TPageService"
BasePath="path.to.pages"
DefaultPage="NewHome"
/>
</services>
</application>
Click here for larger image
Figure 1. The Class Tree Scheme and the Main Classes Provided by PRADO