The first line of the scripting language is to point out that you want the code in your file to run it with what executable program.
For example, the first line of the PHP script can be written in the following formats
#!/usr/bin/php#!/usr/bin/env php#!/usr/bin/env-s-p/usr/local/bin:/usr/bin php#!/usr/bin/env-s-p/usr/local/bin:/ Usr/bin:${path} PHP
#!/usr/bin/env the benefits of PHP notation
The main purpose of this writing is to make your program applicable on different systems.
Whether your PHP is in/usr/bin/php or/usr/local/bin/php
#!/usr/bin/env PHP will automatically look for PHP in the current user path variable to execute.
Plus-P parameter use to specify some directories to find PHP this program
#!/usr/bin/env-s-p/usr/local/bin:/usr/bin PHP's role is to find PHP in the/usr/local/bin and/usr/bin directories.
To make the program more extensible, you can write the following code:
#!/usr/bin/env-s-p/usr/local/bin:/usr/bin:${path} php (no spaces between-s-p)
It will also look in the directory defined in the path variable, in addition to the two directory searches.
#!/usr/bin/php written #!/usr/bin/env PHP would be better, of course #!/usr/bin/env-s-p/usr/local/bin:/usr/bin:${path} PHP
The general use of #!/usr/bin/env PHP This writing can be compatible with most servers.
PHP Script #!/usr/bin/env php notation