gpt4 book ai didi

php - 通过 zencart Order.php 在外部 php 文件中运行查询

转载 作者:搜寻专家 更新时间:2023-10-31 21:27:14 25 4
gpt4 key购买 nike

我正在运行一个基于 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\" />";

关于php - 通过 zencart Order.php 在外部 php 文件中运行查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34306826/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com