PHP获取当前文件所在目录 用 getcwd() 函数或 dirname(__FILE__) <?php echo getcwd() . "<br/>"; echo dirname(__FILE__); ?>