Using Cconsolecommand

Hope I’m in the right forum.

First I’ll explain what I need:

I have a web project in which I have a php script with a function that I want to call or from an action function in the project or from an external c file.

I was told somewhere that I need to use something called CConsoleCommand but I couldn’t find a good example how to implement it for my needs.