我目前使用此代碼:了shell_exec phpfile
if(isset($_POST['url']) && isset($_POST['trefwoorden']))
{
mysql_connect('localhost', 'crawler', 'whathasbeenseencannotbeunseen');
mysql_select_db("crawler");
mysql_query("INSERT INTO jobs (jobID, url, trefwoorden) VALUES ('', '".$_POST['url']."', '".$_POST['trefwoorden']."')");
$output = shell_exec("./content.php " .mysql_insert_id());
echo $output;
}
在我content.php我有以下代碼:
#!/usr/bin/php
<?php
echo 'HET WERKT';
?>
現在我想看看我的了shell_exec實際上在填土工程形式並提交它:但它根本不反映任何事情。
我寫錯了代碼嗎?
是content.php可執行嗎? – codaddict 2010-10-04 09:39:09
您是否將CLI(命令行界面)安裝到PHP?/usr/bin/php是否存在? content.php是否可執行?你有沒有嘗試從外殼運行它? – 2010-10-04 09:41:23
是的。 要填寫評論的文字。 – Jordy 2010-10-04 09:41:36