Creating a "Send us a question" module
One of the first things we are going to create is an empty
index.html
file; this will be used so that no one can take a look at
the folder structure for the module. For example, imagine that our site is installed
in http://wayofthewebninja.com.
If we go to
http://wayofthewebninja.com/modules/mod_littlecontact/ we will see
something like the next image:
If we try to click on mod_littlecontact.php
, we will see the
following phrase:
Direct Access to this location is not allowed.
That's because the code we added to our file is as follows:
<?php defined('_JEXEC') or die('Direct Access to this location is not allowed.'); ?>
Of course, we don't want people to be able to see which files we are using for ...