如果从php调用python webdriver将无法运行

时间:2014-06-17 10:09:41

标签: php python-2.7

我正在尝试从php执行我的python脚本。它停止在webdriver被调用的行[pytest.py]:

path_to_chromedriver = '/home/user/Desktop/2014/programs/chromedriver/chromedriver' # change path as needed
#i can print out something here (e.g. print 'hello') but not after the next line
br = webdriver.Chrome(executable_path = path_to_chromedriver)

这就是PHP调用python脚本[phptest.php]的方式:

$eventid_arg = $_REQUEST['eventid'];
$pyresponse_str = system("python pytest.py $eventid_arg", $retval);

0 个答案:

没有答案