Is a static HTML file, just named to PHP to get automatically the URL. You can use it when your HTML file can be executed as PHP or in PHP code. Te file=<?php echo $_SERVER["PHP_SELF"]; ?> will do the job.
<script type="text/javascript" language="javascript" src="jsrate.php?file=<?php echo $_SERVER["PHP_SELF"]; ?>"></script>