Explain how can we execute a php script using command line?



Explain how can we execute a php script using command line?..

Answer / Lav Kant

On Linux/MacOS, you can run PHP scripts from the command line by navigating to the directory containing your script and executing it with the `php` command: n```bashnphp script.phpn```nOn Windows, use: n```cmdnphp script.phpn```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

Is c similar to php?

1 Answers  


am from coimbatore.am learning php&mysql. what will be the approx salary for me if i get a job in coimbatore.

1 Answers   HCL,


How long should a session last?

1 Answers  


When to use self over $this?

1 Answers  


What is php good for?

1 Answers  


What is laravel php?

1 Answers  


What is the main difference between php 4 and php 5?

1 Answers  


What are PHP Magic Methods/Functions. List them.

1 Answers  


Why is overriding runtime?

1 Answers  


How to get the total number of values in an array?

1 Answers  


Explain about getters and setters in php?

1 Answers  


Explain some of the php string functions?

1 Answers  


Categories