Php get path Function Summary
! [Enter picture description] (https://static.oschina.net/uploads/img/201604/19160021_NkM5.png "enter picture title here ") "_ FILE _ and $ _ SERVER ['script _ filename'] both return the complete path (absolute path) and FILE name of the php file, the difference is that $ _ SERVER ['script _ filename'] reflects the absolute path and FILE name of the current execution program; __file _ reflects the original FILE (included FILE) for example, I wrote two functions in test/haha. under the php file. import haha to the PHP file. php: The browser accesses test. php output result :! [Enter picture description] (https://static.oschina.net/uploads/img/201604/19160424_Psfo.png "enter picture title here ")! [Enter picture description] (https://static.oschina.net/uploads/img/201604/19160328_BOVe.png "enter picture title here ")! [Enter picture description] (https://static.oschina.net/uploads/img/201604/19163031_bxIC.png "enter picture title here ")! [Enter picture description] (https://static.oschina.net/uploads/img/201604/19163303_qsk0.png "enter picture title here ")! [Enter picture description] (https://static.oschina.net/uploads/img/201604/19163457_e7ZR.png "enter picture title here ")! [Enter picture description] (https://static.oschina.net/uploads/img/201604/19163850_4qdK.png "enter picture title here ")