class dbconn { var $conn = 0; function dbconn($dbhost,$dbuser,$dbpw,$dbname){ $this->conn = mysql_connect($dbhost,$dbuser,$dbpw); !$this->conn && $this->halt("Connect to
原创 2023-01-05 11:14:18
113阅读
版本一:<?php //这是一个工具,作用是完成对数据库的操作 class SqlHelper { public $conn; public $dbname="test"; public $username="root"; public $password="root"; public $host="loca
原创 2022-11-28 18:29:54
186阅读
<?phpclass Dir { //打开指定目录 /** * 遍历目录函数,只读取目录中的最外层的内容 * @param string $path
原创 2023-02-16 13:32:43
72阅读
fileName_str=$fileName_str; $this->fileOpenMethod_str=$fileOpenMethod_str; } function __destruct() { //析构函数 } public funct...
原创 2022-04-02 15:42:53
78阅读
发一段自己整理的文本操作 目前包含常用文本字符串无乱码截取,词意化时间,以及敏感词过滤(其中敏感词过滤需自己添加敏感词库类似于   $config ['sensitive_words'] = array (         '&curren;李刚',&
原创 2011-01-14 15:17:04
613阅读
} /** * 写日志 * * @param string $s_message 日志信息 * @param string $s_type 日志类型 */ public static function write
转载 2014-03-30 12:31:00
128阅读
2评论
1,生成缩图代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<?php///生成縮圖///$resizeimage=newresizeimage($filesaved,$dstimg,250,250);classresizeimage{var...
转载 2010-07-27 16:47:00
115阅读
class dbconn { var $conn = 0; function dbconn($dbhost,$dbuser,$dbpw,$dbname){ $this->conn = mysql_connect($dbhost,$dbuser,$dbpw); !$this->conn && $this->halt("Connect to MySQL failed"); $serverinfo = mysql_get_server_info($this->conn); if ($serverinfo > '4.1'
转载 2011-03-18 14:23:00
163阅读
2评论
一.PHP连接到MySQL 这里,我们全面采用UTF-8编码。设置Zend Stduio的编码:Window -> Preferences -> Workspace 标头设置,让火狐和IE保持编码统一:<?phpheader('Content-Type:text/html; charset=utf-8');?> 连接MySQL<?php$
原创 2017-07-28 12:52:12
592阅读
首先先吐槽下mysqli与mysql,前者是后者的改进版,我的ps不支持mysql相关函数,而且我看的是w3school上的教程,呵呵,w3school上的代码用的是旧版本的mysql函数,我去,让我一个个百mysqli系列函数的用法。。。 php5以上的版本,建议使用mysqli和PDO。有个网站
转载 2017-04-02 11:54:00
180阅读
2评论
今天写了一个php操作mysql,功能比较少,希望能能给你带来帮助共同学习! 以下代码命名为mysql.class.php <?php class mysql {     private $conn;     private $host;//主机名     private $db
原创 2011-03-17 14:05:32
491阅读
1评论
<?phpclass File { //Bytes/Kb/MB/GB/TB/EB /** * 转换字节大小 * @param number $size * @return number *
原创 2023-02-16 13:33:03
52阅读
PHP操作excel PHPExcel ://.cr173./soft/40741.html 我的微云:://share.weiyun./2db79f1438f87999cfb09ca05890d764 下载后: Tests/01simple.php 看代码就可以
转载 2015-02-03 09:54:00
117阅读
2评论
<span style="font-size:18px;">class myMemcache { private $memcache; /** * 一般建议这2个值做成常量的形式 */ public function __construct($host = '192.102.1.8', $port = 6379) { $...
原创 2014-07-23 16:09:55
54阅读
<?php include_once dirname(dirname(dirname(__FILE__))).DIRECTORY_SEPARATOR.'Config'.DIRECTORY_SEPARATOR.'database.php'; class MongoClass3{   static public $conn;//数据库连
原创 2015-09-02 10:33:31
332阅读
fastdfs_get_last_error_no(), 'info' => fastdfs_get_last_error_info(), 'act' => $act) private static $instance = null; private function __construct(){ ...
转载 2021-10-27 23:23:00
177阅读
2评论
<?phpclass db_factory{ // The parameterized factory method public static function create($type, $cached=false) { me = '_cache';...
原创 2022-08-05 16:56:55
60阅读
php操作mysql小结
原创 2014-07-28 19:36:51
770阅读
PHP PDO操作MYSQL学习要点:1、        PHP PDO配置2、        连接mysql及异常处理3、        query,exec
原创 2017-08-24 21:52:28
635阅读
使用方法·<?php// 联接FTP服务器$conn = ftp_connect('ftp.server.com');// 使用username和password登录ftp_login($
原创 2023-02-16 13:32:16
130阅读
  • 1
  • 2
  • 3
  • 4
  • 5