为了扩展zencart,需要增加新的php页面,
例如
test.php<?php
$orders_query = "SELECT * FROM products limit 0,1";
$orders = $db->Execute($orders_query);
$orders_id = $orders->fields['products_id'];
echo $orders_id;?>运行后
Fatal error: Class 'queryFactory' not found in D:\soft\wwwroot\zencart\includes\如果这样
<?php
require('../../classes/db/mysql/query_factory.php');$orders_query = "SELECT * FROM products limit 0,10";
$orders = $db->Execute($orders_query);
$orders_id = $orders->fields['products_id'];
echo $orders_id;?>结果
Illegal Access有没有简单直接调用 $db->Execute('')的方法;问题有点菜,先谢谢了,在线等
例如
test.php<?php
$orders_query = "SELECT * FROM products limit 0,1";
$orders = $db->Execute($orders_query);
$orders_id = $orders->fields['products_id'];
echo $orders_id;?>运行后
Fatal error: Class 'queryFactory' not found in D:\soft\wwwroot\zencart\includes\如果这样
<?php
require('../../classes/db/mysql/query_factory.php');$orders_query = "SELECT * FROM products limit 0,10";
$orders = $db->Execute($orders_query);
$orders_id = $orders->fields['products_id'];
echo $orders_id;?>结果
Illegal Access有没有简单直接调用 $db->Execute('')的方法;问题有点菜,先谢谢了,在线等
第二个应该是
不是zendcart的文件,没有引入它的公共文件
下面是disccuz的,做的类似判断
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
exit('Access Denied');
}