Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run a PHP script directly in PhpStorm

Tags:

  1. How can I instantly run the current PHP file in PhpStorm?
  2. How can I execute PHP command in PHPstorm like PyCharm?
like image 913
Handsome Nerd Avatar asked Oct 12 '11 11:10

Handsome Nerd


People also ask

Can PhpStorm run PHP?

To be able to run an application from PhpStorm, you first need to configure a PHP interpreter as described in Configure local PHP interpreters and Configure remote PHP interpreters. After that, you can do any of the following: Run a single script from the code editor. Create and run a dedicated run/debug configuration.

Can Cron run PHP script?

Once the PHP script is called for the first time by the crontab daemon, it can execute tasks in a time period that matches the logic of your application without keeping the user waiting. In this guide, you will create a sample cron_jobs database on an Ubuntu 20.04 server.


1 Answers

Right click in the editor, choose Run (or press ctrl+shift+f10) for command line script execution. If you want to test it on a web server, use Open in Browser from the same menu (you must have browser and server with mappings properly configured for this).

like image 177
CrazyCoder Avatar answered Nov 15 '22 12:11

CrazyCoder