$PHP_SELF is a global PHP variable which contains the name of the script, relative to the http directory in which it's stored.
If I create a page named 'jake.php' and store it at the top of my ~/htdocs path, than $PHP_SELF is '/jake.php'.
If I create a page named 'jake.php' and store it in a directory called "stuff" in my ~/htdocs path, then $PHP_SELF is '/stuff/jake.php'.
Use it in a form, as the examples in your other related post shows, then view the document source in your browser. You should see the form action reflect reflect the relative name of the PHP script.