<?php defined('ACC')||exit('Access Denied'); // 封裝mysql操作類,包括連接功能,及查詢功能. class mysql extends absdb{ protected static $ins = null; protected $host; // 主機(jī)名 protected $user; // 用戶名 protected $passwd; // 密碼 protected $db; // 數(shù)據(jù)庫名 protected $port; // 端口 protected $conn = null; // 在內(nèi)部操作,獲得一個(gè)對(duì)象 public static function getIns() { if(self::$ins === null) { self::$ins = new self(); } $conf = conf::getIns(); self::$ins->host = $conf->host; self::$ins->user = $conf->user; self::$ins->passwd = $conf->pwd; self::$ins->db = $conf->db; self::$ins->port = $conf->port; self::$ins->connect(); self::$ins->select_db(); self::$ins->setChar(); return self::$ins; } // 不讓外部做new操作, protected function __construct() { } // 連接數(shù)據(jù)庫 public function connect() { $this->conn = @mysql_connect($this->host,$this->user,$this->passwd,$this->port); if(!$this->conn) { $error = new Exception('數(shù)據(jù)庫連不上',9); throw $error; } } // 發(fā)送sql查詢 public function query($sql) { $rs = mysql_query($sql,$this->conn); if(!$rs) { log::write($sql); } return $rs; }
mysql? ??? ??? ??? PHP ??????. ??? ???? ????? ???? ???.
? ???? ?? ???? ???? ????? ?? ???? ????? ????????. ?????? ???? ?? ??????! ? ???? ?? ???? ?? ?????? ?????. ??? ???? ???? ??? ????. ??? ??? ?? ??? ?? ??? ???? ????! ??? ?? ?? ??? ???? ????? ????. ???: admin@php.cn
?? ??

29 Jul 2016
??? ?? ??? ?? ?? ?????: ??? ?? ??? ?? ?? ????? ??? ?? ????(1): ? ??? ?????? ???? ??? ??? ??: # ------ --- --------------------- # # ??? ??? ?? 'author' # CREATE TABLE ??? ( author_id int (6) DEFAULT '0' NOT NULL auto_increment, first_name varchar(20)

29 Jul 2016
??? ?? ??? ?? ??: ??? ?? ??? ?? ?? php ??? ?? ?? ?? ??? ??: ??? ?? ??? ?????: <?php /** ?? ????**/ class DefaultController extends AppController { public function index() { $len = 5 ; $str = "ABCDEFGHIJKLNMPQRSTUVWXYZ123456789"; $im = imagecreatetruecolor (70, 20);

29 Jul 2016
??? ?? ??? ?? ?? : ??? ?? ??? ?? ?? ?? ?? ???? (2) : ?? ???? ?? ?? : <? if(!$UploadAction): ?> <? ??? ???. //???: Kong Xiuxiang. Date: 2001/3/24 /* session_start(); if (!isset($auth_passed)) { echo "? ??? ??? ???? ??? ? ????." } if(isset($u_name)) {

26 Mar 2025
? ??? & lt; thread & gt; ???, ?? ? ??? ?? ??. ?? ??? ??????? ?? ??? ???? ??? ?????.

24 Feb 2025
iOS 18.1, iPados 18.1 ? MacOS 15.1 Sequoia? ??? ????? ?????. Siri? ??? ?? ??? ??????. ?, ? ??? ?? ???? ???? Siri? ?? ? ? ????. ???, ??? ? ?? ???? ?? ????? ?? ??????. Siri? ??? ?? ??? ? ? ?? ???? ???? ??? ??? ??? ??? ??? ?? ?????. ?? Apple? ??? ??? ???? ?? ?? ???? ????. ??? ?? ??? Siri ??? ??? Chatgpt ?? ??? ???? ?? ?? ??? ????? ( "Apple Intel"???? ??? ? ????.

20 Apr 2025
??? JavaScript?? ?????. ??? ??? ??? ?? ?? ???? ??? ??? (?? FN ? ??)? ???? ?? (ha!) ??? ??? ?? ??????.


??? ??

??? ?? ????? PHP ?????
??? ?? ????? PHP ?????

50?? ??? ??? PHP ???? ??
??? PHP ????, ??? ????? ??? ???? ?????

??? ???? ?? ?? PHP ?????
??? ???? ?? ?? PHP ?????
