I'm new to PHP and web, and I was wondering, in some URLs what do we call the last string value after the last slash. for example "abc123" in this url
URL 1
http://www.example.com/folder1/abc123
I know about the URL
parameters
that is exist after a ?
question mark and how to get it inside my PHP scripts, like
URL 2
http://www.example.com/folder1/phpscript1.php?name=mike&age=24
when the browser requests this resource from the web server, the web server (Apache for example) are going to invoke the php module which will try to parse phpscript1.php
giving him the data he needs to work. in this example I can see the name
and age
parameters inside my phpscript1.php file like this
$name = $_GET['name'];
$age= $_GET['age'];
Q1- In URL1 what do I call "abc123" ? parameters ?
Q2 In URL1 how the web server is going to deal with this request? will it try to find a resource that is called "/folder1/abc123"
and just send it blindly to the browser ? for example if I have a file on the server that has the name "abc123"
inside the folder "/folder1/"
, is it going to be sent to the browser ?
Q3 in URL1 how do I get the value "abc123" inside my PHP scripts? or even which is more important, which PHP script are going to be invoked by the PHP module to handle this request?