Get current working directory of php script/application January 8, 2010 • 7 words • 1 min read #PHP $myPath = realpath(dirname(__FILE__)); or $myPath = getcwd(); Andrew Odendaal Writing about cloud architecture, DevOps, distributed systems, and software development since 2007. About this site → Related Articles Stop That Referrer in PHP! Ternary Operation [Solved] PHP’s typeof – gettype() Actionscript 2 – PHP Data Transfer Unique Random Numbers in PHP