Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what's the difference between SCRIPT_FILENAME and SCRIPT_NAME?

I tried to search for a difference but each time the vars are identical, any ideas ?

like image 955
Asaf Avatar asked May 20 '10 07:05

Asaf


2 Answers

http://www.php.net/manual/en/reserved.variables.server.php

Based on my understanding of this, they can be different if you're executing through the command line (CLI).

like image 86
AvatarKava Avatar answered Nov 08 '22 02:11

AvatarKava


Check THIS Difference:

  • script_filename returns REAL DIR C:/xampp/htdocs/demo/index.php

  • file returns LOGIC JUNKTION D:\www\local\demo\cms\init.php

Hold that in mind when checking pathes

like image 23
Humer IT Avatar answered Nov 08 '22 03:11

Humer IT