dream0776 2011-05-14 20:57
浏览 10

php mysqli问题

Hey, I am having a heck of a time trying to get something to work. Hopefully someone can help me out!

So I have a mysqli class as such:

class mysqli {

    public static $mysqli2;
    public function __construct(){}

    static function con(){
        if(!self::$mysqli2){
            self::$mysqli2 = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
        }
        return self::$mysqli2;
    }
}

which I can access from another function by doing something like:

gd::con()->prepare(...)

However I am having trouble accessing this from another class which I have. How can this be done, that is, accessing this function from this mysqli class, from within another class? Thanks!

  • 写回答

1条回答 默认 最新

  • dongshipang8094 2011-05-14 20:59
    关注

    Your can't create class mysqli, because there is one standart

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度