sudo in php exec()

后端 未结 7 1270
执笔经年
执笔经年 2020-11-22 09:44

I don\'t know what the deal is here…

So I want to run an applescript: sudo osascript myscript.scpt

This works fine in the terminal, but not when

7条回答
  •  南旧
    南旧 (楼主)
    2020-11-22 10:34

    The best secure method is to use the crontab. ie Save all your commands in a database say, mysql table and create a cronjob to read these mysql entreis and execute via exec() or shell_exec(). Please read this link for more detailed information.

            • killProcess.php

提交回复
热议问题