Home > DeveloperSection > Interviews > How can I execute a PHP script using command line?

Posted on    October-19-2010 12:00 AM

 PHP PHP 
Ratings:
 1 Answer(s)
  860  View(s)
Rate this:

Chris S
Chris S

Total Post:23

Points:115
Posted on    November-10-2010 1:00 AM

We can execute the php script on command line
php filename.
You can easily parse command line arguments into the $_GET variable by using the parse_str() function.

<?php

parse_str
(implode('&'array_slice($argv1)), $_GET);

?>

Modified On Mar-21-2016 07:01:57 AM

Don't want to miss updates? Please click the below button!

Follow MindStick