"; echo dirname(__FILE__); ?>"/> "; echo dirname(__FILE__); ?>">

Home >Backend Development >PHP Tutorial >gone not around any longer PHP gets the directory where the current file is located getcwd function

gone not around any longer PHP gets the directory where the current file is located getcwd function

WBOY
WBOYOriginal
2016-07-29 08:39:481254browse

Use getcwd() function or dirname(__FILE__)

Copy the code The code is as follows:


echo getcwd() . "
";
echo dirname(__FILE__);
?>

The above introduces the gone not around any longer PHP getcwd function to get the directory where the current file is located, including the gone not around any longer aspect. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn