maxudaskin Posted March 8, 2009 Share Posted March 8, 2009 What is the difference between pagename.php?var=val and pagename.php/val? Link to comment https://forums.phpfreaks.com/topic/148432-arguments-versus-slash/ Share on other sites More sharing options...
opalelement Posted March 8, 2009 Share Posted March 8, 2009 I belive pagename.php/var would mean that it is in a directory named pagename.php, not an actual file... but that is just a guess, I have never really seen anyone use it the second way. Link to comment https://forums.phpfreaks.com/topic/148432-arguments-versus-slash/#findComment-779284 Share on other sites More sharing options...
maxudaskin Posted March 8, 2009 Author Share Posted March 8, 2009 I tried it, I didn't understand it though. The index.php/var displayed the HTML information of index.php Link to comment https://forums.phpfreaks.com/topic/148432-arguments-versus-slash/#findComment-779286 Share on other sites More sharing options...
RichardRotterdam Posted March 8, 2009 Share Posted March 8, 2009 maybe you are confusing something here. you can use mod_rewrite to make your url like : "index.php?var=1" look like "index/1" if you are not using mod_rewrite or a ms equivalent then you are just requesting a file from a directory Link to comment https://forums.phpfreaks.com/topic/148432-arguments-versus-slash/#findComment-779456 Share on other sites More sharing options...
Mchl Posted March 8, 2009 Share Posted March 8, 2009 Actually it seems, that on apache without mod_rewrite the string after slash just gets ignored. So for example http://localhost/test.php/foo?var=1 invokes test.php with $_GET['var'] == '1'. Link to comment https://forums.phpfreaks.com/topic/148432-arguments-versus-slash/#findComment-779463 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.