Run windows command in php

前端 未结 5 917
梦毁少年i
梦毁少年i 2021-02-08 15:20

Is it possible to run windows command line code from php ? My windows command line code is:



        
5条回答
  •  伪装坚强ぢ
    2021-02-08 15:42

    C:\xampp\mysql\bin>mysqlbinlog is not a command.

    I think you mean C:\xampp\mysql\bin\mysqlbinlog.

    Notice the replacing of the > in a \.

    The > is only visible in the command prompt as a separator (for the eyes) but you should not use it like that in a command unless you are trying to redirect your output. (which you are doing again later in the line). So just replace that first > in a \ and your command will run.

提交回复
热议问题