Php code inside your bat files

    Quite often I write small php scripts for myself, but every time I’m tired of launching them from the command line, but I didn’t want to associate them with a double-click launch, because I’m already used to opening the file in the editor in this case. You can write batch files, with a single line inside, to run, but in this case there will already be two files for each simple script, I decided to cross these files.

    What happened.
    Create a file, name it for example p.bat and write the following code into it. You probably need to explain only line 4, the echo call is needed to erase the word rem in the output

    rem "путь до интерпретатора пхп" p.bat
    exit
    rem */ echo "\r \r";

    //тут код на пхп



    Also popular now: