简体   繁体   中英

How to execute Python and .bat scripts from a web page on local machine

I want create a web page which has links of different Python scripts and .bat files, which can call different .bat file with different parameters specified in web-form.

Purpose of this web page is to only use on a local machine.

I tried with JavaScript and PHP, but I am not able to open any local .bat or .py file on machine. How can I do this?

Learn more about exec @ http://php.net/manual/en/function.exec.php

<?php
exec("batfilename.bat");
?>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM