I have a script, basically a spider.. that I would like to run on the server.. how would I execute it from the command line?
Thanks!
Execute php file from command line
Moderator: General Moderators
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
- WaldoMonster
- Forum Contributor
- Posts: 225
- Joined: Mon Apr 19, 2004 6:19 pm
- Contact:
Use php from the cli directory, the other php is for fast-cgi.
Usage with php tags in the script:
Usage without php tags in the script:
For all parameters run:
Usage with php tags in the script:
Code: Select all
php -f "pathtoscript/test.php"Code: Select all
php -r "pathtoscript/test.php"Code: Select all
php --help