通过zencart Order.php在外部php文件中运行Query


Run Query in external php file through zencart Order.php

我正在运行一个基于PHP的应用程序,另一方面,我有一个基于Zencart的网站,我想通过Zencart的order.PHP文件运行第一个应用程序的PHP文件。

order.php函数:

function send_order_email($zf_insert_id, $zf_mode)

在这里面,我想运行另一个具有以下代码的应用程序的查询:

//external.php
$affid = isset($_SESSION['affid']) ? $_SESSION['affid'] : ''; 
if (!$affid){
    exit;
} else {
    mysql_query("UPDATE table SET type='2' where OrderID = '{$affid}'",DBH);
}  

以下代码调用了要运行的外部php文件:

 echo "<img src='"http://domain.com/external.php'" />";