V
V
vaflya2015-10-14 14:50:14
PHP
vaflya, 2015-10-14 14:50:14

Include site scripts via index.php, is it ok?

Good afternoon guys! I am not a professional, but just a person who has a hobby of writing a site.
So, all my life I’ve been making a website in the old fashioned way with a bunch of scripts at the root (index.php, login.php, static.php, test.php etc.).
Then I noticed an article-lesson where everything is loaded through ./index.php, the index.php itself parses the url, and makes the include of the desired script.
Is this the right approach? And what is the name of such a method (to read in Google).
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Optimus, 2015-10-14
@vaflya

This is called "routing" google this word, it is built-in in frameworks, but you can also write it yourself.
Yes, this is normal, it is considered a modern, advanced approach.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question