LeonLatex Posted September 10, 2021 Share Posted September 10, 2021 I'm wondering the following: What is the name of the "PHP language / in the PHP environment" when you want to develop / have developed a project (eg a CMS) that retrieves all underlying pages to be displayed in only one file, such as and file index.php? For example. http://ww.domain.com/my_directory/?p and retrieving what is referenced in one and the same file. when you call something via "?p" (p is a example). Hope you understand what I mean because I can not describe this better in English. It's like sending a query (? P) and retrieving what is referenced in one and the same file. Quote Link to comment Share on other sites More sharing options...
dodgeitorelse3 Posted September 10, 2021 Share Posted September 10, 2021 (edited) I reread OP again and removed what I had posted bad info. My apologies. Edited September 10, 2021 by dodgeitorelse3 Quote Link to comment Share on other sites More sharing options...
LeonLatex Posted September 10, 2021 Author Share Posted September 10, 2021 👍 No worries mate 😃 Quote Link to comment Share on other sites More sharing options...
dodgeitorelse3 Posted September 10, 2021 Share Posted September 10, 2021 the ? is a separator which separates the url from the passed parameters typically passed from a form. https://www.php.net/manual/en/tutorial.forms.php Quote Link to comment Share on other sites More sharing options...
Solution requinix Posted September 10, 2021 Solution Share Posted September 10, 2021 It's not exactly easy to tell what it is you're describing, but I think the general term you're looking for is "front controller": where most/all code doesn't start off by executing individual .php files but instead everything goes through one file (typically index.php) which then has some amount of logic to determine what code should be running. That process can start with URL rewriting (telling the web server that everything should go through index.php) or simply using specially-crafted URLs (such as query strings like /my_directory/?stuff or PATH_INFOs like /index.php/stuff); the former is the modern approach. 1 Quote Link to comment Share on other sites More sharing options...
LeonLatex Posted September 11, 2021 Author Share Posted September 11, 2021 Thanks to you both dodgeitorelse3 and requinix. Just what i needed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.