[해결로 표시] PHPStorm as a console app with php

  

3
주제 스타터

How to configure PHP Storm to work with inputs - meaning with command line (for example with readline() function), not in browser ( do not need debugging in browser). I need to create console app with php and run php as a script.

Thanks

1개 답글
2

Here on the screenshot you can see how to configure PHPStorm to show PHP as a script:

run php as a script with phpstorm

...and this is my program:

<?php
 
echo "Enter your grade:";
$grade = readline();
$oldGrade = 5;
$finalGrade = ($grade + $oldGrade) / 2;
var_dump($finalGrade);
공유: