"; echo dirname(__FILE__); ?>">
Use getcwd() function or dirname(__FILE__)
Copy the codeThe 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.