making test.php executable on linux
Posted: Wed Aug 18, 2004 10:01 am
Yo!
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?
cheerio
/soul8o8
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?
cheerio
/soul8o8