PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have installed php4 on a debian box. I want to run php from the command line. I couldn't find any php4-cli with apt-get, erh so i tried installing php-cgi. (stupid?) Now i have a 'php4' in my /usr/bin, is that good?
Anyway so i made a script file like so:
#!/usr/bin/php4
<?PHP
echo "yo!";
?>
and called it 'test'. Then i ran 'chmod +x test'.. ok, but it doesn't seem to work! When i type 'test' and press enter nothing happends! If i type 'php4 test' it runs the program! What am i doing wrong? Shouldn't it work?
aaaah, i have to set the PATH in order for the shell to look for the executable in the proper folder, casue it wont search for executables in the current working directory.. sweet..
export PATH=$PATH:/home/me/bin
also there already was a file named 'test' somwhere else...