Information Technology Questions and Answers Community

Running PHP script from command prompt

How to run PHP script from the command prompt?

PHP        
Your Answer: 

1 Answers

Running PHP script from command prompt is pretty easy. Suppose you have a PHP file named as demo1.php and file contains the following content.

<?php

    echo “What a wonderful world!!”;

?>

You can run this through command prompt.

$php demo1.php

So the result will be-

What a wonderful world!!

Answered On 06 Apr at 09:29
Edit Account
LOGIN INFORMATION
Change Settings
Email Notifications Notifications will be sent to abcd@gmail.com
Select option for your email notifications:
Mature / News Filter We'll send on email when new jobs are posted
Option 2 for email notification We'll send on email when new jobs are posted