当前位置:首页 > 日记本 > 正文内容

python中运行php文件

zhangchap2年前 (2022-11-13)日记本200
import subprocess

def run_php():
    proc = subprocess.Popen("php /www/wwwroot/tag.php", shell=True, stdout=subprocess.PIPE)
    script_response = proc.stdout.read()
    print(script_response.decode().strip())


分享给朋友:

相关文章

网络编辑工具箱注册ComCtl32.ocx

1.把ComCtl32.ocx放到c:\Windows\SysWOW64,注:需要管理员权限 2.打开C:\Windows\System32 找到 cmd.exe 鼠标右键管理员身份...

lxml win 安装方法

文档地址:https://lxml.de/installation.htmlwindows 下安装不了的都可以在这里找:https://www.lfd.uci.edu/~gohl...

python 随机生成时间戳写入txt文件/运行sql语句

import time from random import randint with open('time.txt', ...

python 获取当前时间及随机时间戳

import time from random import randint time.strftime('%Y-%m-%d %H:%M:...

python读取txt文件放到Queue队列

from queue import Queue with open('kw.txt',encoding='utf-8')&nb...

python fake_useragent 模块用法

我们每次发送requests请求时通过random从中随机获取一个随机UserAgent,两行代码即可完成UserAgent的不停更换 from fake_useragent i...

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。