HOW CAN I EXECUTE A PHP SCRIPT USING COMMAND LINE?

Rajesh Goswami

Total Post:85

Points:425
Posted by  Rajesh Goswami
PHP 
PHP
 1099  View(s)
Ratings:
Rate this:
  1. Chris S

    Post:23

    Points:115
    How can I execute a PHP script using command line?

    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

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!