tags:

views:

105

answers:

2

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

Is there any one who had an experience about this before?

+2  A: 

Use a symbolic link. That's typically the way unix remaps the location of the interpreter. (whether it's bash, perl, python, php...)

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

altCognito
A: 

Not sure if this answers your question, but:

#!/usr/bin/env php

should work almost everywhere

Evert