Creating shebang dynamic in PHP CLI scripts

I wonder if there is a way to make the shebang value at the top of my PHP CLI files dynamic (by being set as a constant in the config file)?

Does anyone have any experience with this before?

+1


a source to share


2 answers


Use a symbolic link. This usually means unix reassigns the interpreter location. (be it bash, perl, python, php ...)



http://www.linux.org/lessons/advanced/x1110.html

+3


a source


Not sure if this answers your question, but:

#!/usr/bin/env php 

      



should work almost everywhere

+3


a source







All Articles