I usually see
#!/usr/bin/php
or
#!/usr/bin/perl
at the top of a CGI file. How is a
#!/usr/bin/env php
or
#!/usr/bin/env perl
different from the first 2 lines? They work as well.
I usually see
#!/usr/bin/php
or
#!/usr/bin/perl
at the top of a CGI file. How is a
#!/usr/bin/env php
or
#!/usr/bin/env perl
different from the first 2 lines? They work as well.
Shebangs, the #!/usr/bin/sh
part of the script, require an absolute path to the interpreter. Because there is no standard path for some interpreters some scripts use #!/usr/bin/env interpreter
to launch the correct interpreter.