0

我有一个名为的 php 页面automate.php,其中包含多个 php 文件 - 例如:

customer_reminders_1.php
customer_reminders_2.php
customer_reminders_3.php

每个人都有相同的查询,但从表中的不同字段进行搜索。

我有一种感觉,如果在上述多个页面中返回的查询中有有效行,它们就会相互混淆。

例如,$sql="SELECT * from table...所有 3 和 while 循环等都有。

运行查询后取消设置变量的最佳方法是什么,或者我可以在包含文件的automate.php中添加一些内容以阻止它们混合在一起?

4

2 回答 2

1

尝试使用 unset() 函数取消设置 sql 查询

 unset($sql);
于 2013-09-22T17:02:52.200 回答
0

您是否在 s 之间尝试过unset()http://de.php.net/manual/en/function.unset.phpinclude

编辑:当然,您需要指定要取消设置的所有变量。

于 2013-09-22T16:54:56.797 回答