running a php script from command line
I've got well over a million flat files and have written a php script that scrapes the necessary content and drops to a mysql database -- I ran it once on a sub section of the files from a localhost browser and it timed out after about 50,000 records...
The script is simple, it reads the file, displays the data it's scraping and inserts it into the database... I'm running a pretty stock install of latest version of pcbsd and was wondering would it be possible to run this script from the path of /usr/local/www/apache22/data/Sect1 from the command line -- what would be my syntax for this... do I need to be in the directory or elsewhere... thanks... |
running it through the 'php' or 'php5' command should do it. Here are a few ways that might work given your file was 'script.php':
Code:
php script.php |
All times are GMT -5. The time now is 10:35 AM. |