Find the answer to your Linux question:
Results 1 to 2 of 2

Thread: php and $0

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2009

    php and $0

    I am wondering what would be the equivalent to $0 for php

    just to get a quick answer from someone who knows php, $0 is the shell scripting variable that gets
    the scripts name

  2. #2
    The safest way to do it is:
    $phpself = basename(__FILE__);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts