How do you execute a method in a class from the command line

前端 未结 4 1563
感情败类
感情败类 2020-12-09 03:41

Basically I have a PHP class that that I want to test from the commandline and run a certain method. I am sure this is a basic question, but I am missing something from the

4条回答
  •  情深已故
    2020-12-09 04:20

    Here's a neater example of Repox's code. This will only run de method when called from the commandline.

    hello();
    }
    
    ?>
    

提交回复
热议问题