如何在PHP中获得文件的完整路径?
例如: /home/yob/public_html/demo/envato/cce/tug/cron/cron.php
我想要文件所在的文件夹:
/home/yob/public_html/demo/envato/cce/tug/cron/
PHP <5.3
$fullpath = dirname(__FILE__);
$fullpath = __DIR__;
http://php.net/manual/en/language.constants.predefined.php