I want to get a PHP script to run when I go to a certain folder in my website, but not have it display in the URL.
I want /number/number.php to run whenever the user visits /number/
Do I need to use the .htaccess file to do this?
I want to get a PHP script to run when I go to a certain folder in my website, but not have it display in the URL.
I want /number/number.php to run whenever the user visits /number/
Do I need to use the .htaccess file to do this?
You can try to create an index.php file on this folder and use a include statement to include number.php. As far as I now, everytime you type a folder at a URL, the server search for an index file to run and the index.php is not included at the url.
If you want a script to run without having the user visit that page.. you can simply include the file in another file.. example, you can create an index.php in folder /number/ which contains the code:
<?php
include("./numbers.php"); /* the './' means, it refers to the same folder */
?>