Download on GitHub

PHPZevelop

Pages

Adding pages

By placing *.php files in the "pages/" directory they will be accessable through the URL by using the page name without the ".php" extension.

If the file is placed inside a directory within "pages/" then you can access it by using a "/" to delimitise folder names in the URL to access it.

Eg. this file lives here:

/pages/help/adding-pages.php

.. and is being accessed through the URL by:

/help/adding-pages

Default pages

If you were to go to help you would get a 404 error because even though the directory "help/" exists, it is not a readable page. If you would like "help/" to show a page you can create any of the pages found in the $CFG array in "/config.php":

"DefaultFiles" => array("index", "default", "home")

.. in the "help/" directory.



© PHPZevelop 2017 - @_Zephni (Craig Dennis)