有没有办法在python中执行php脚本?以及如何测试呢?因为我尝试使用子流程,但是它不起作用。输出为255
import subprocess
subprocess.call(["php","-f","01_getdata_input.php","bib_id_skjawasur_texts","bib_id_ayt_texts"])
我的php文件是这样的
<?php
require_once "libs/c_db.php";
require "libs/c_general.php";
$obj = new ProsesData();
$obj->proses($argv[0],$argv[1]);
class ProsesData
{
private $table;
public function __construct() {
$this->db = new c_DB("localhost", "root", "", "skripsi");
$this->libs = new c_General();
}
public function proses($data1,$data2) {
echo $data1;
}
};