Posted By

zartgesotten on 04/13/10


php path filename dirname filepath

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Get full path of current file

 / Published in: PHP

  1. //get full path including filename of current file
  2. $fileTarget = __FILE__;
  3. // get absolute path
  4. $path = dirname($fileTarget);
  5. //or shortform
  6. $path = dirname(__FILE__);

Report this snippet  

You need to login to post a comment.