code_junkie

In PHP, Best way to ensure current working directory is same as script , when using CLI

Nov 11th, 2011
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.07 KB | None | 0 0
  1. chdir(dirname(__FILE__));
  2.  
  3. <?php
  4. echo "I'm here: ".__FILE__."n";
  5. ?>
Add Comment
Please, Sign In to add comment