ashjack ashjack - 28 days ago 5
PHP Question

How do I allow PHP to run when the script is not in the URL?

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?

Answer

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.