memo

memo dayo.

$_SERVER['SCRIPT_NAME'] と $_SERVER['PHP_SELF'] の違い


■ぱっと見た感じ同じっぽい


 ・
 ・
 ・
["REQUEST_URI"]=>
string(23) "/test/index.php?id=0001"
["SCRIPT_NAME"]=>
string(15) "/test/index.php"
["PHP_SELF"]=>
string(15) "/test/index.php"
 ・
 ・
 ・


■けど、pathinfoが付くと違いが分かる


 ・
 ・
 ・
["REQUEST_URI"]=>
string(28) "/test/index.php/aaa/?id=0001"
["SCRIPT_NAME"]=>
string(15) "/test/index.php"
["PATH_INFO"]=>
string(5) "/aaa/"
["PHP_SELF"]=>
string(20) "/test/index.php/aaa/"
 ・
 ・
 ・