如何从网址访问php文件

How do I access a php file from the url of my browser something like this

wwww.php.com/index.php?page=1&id=2 

I want to understand how the setting the page on the url works if you know what I mean.

You cant. PHP is server-side. You can only see the result. To view the code you need access to the server.

Try to parse url in php to get result. see below

<?php
$url = '//www.example.com/path?googleguy=googley';

// Prior to 5.4.7 this would show the path as "//www.example.com/path"
var_dump(parse_url($url));
?>

result :

array(3) {
  ["host"]=>
  string(15) "www.example.com"
  ["path"]=>
  string(5) "/path"
  ["query"]=>
  string(17) "googleguy=googley"
}