易截截图软件、单文件、免安装、纯绿色、仅160KB

php PDO 链接 mysql 最简单 实例

define("DB_SERVER","127.0.0.1");
define("DB_PORT",3306);
define("DB_CATALOG","uab");
define("DB_USERID","root");
define("DB_PASSWORD","");
$dsn="mysql:host=".DB_SERVER.";port=".DB_PORT.";dbname=".DB_CATALOG;
self::$__PDO=new PDO($dsn, DB_USERID, DB_PASSWORD);
//support long connection
self::$__PDO=new PDO($dsn, DB_USERID, DB_PASSWORD, array(PDO::ATTR_PERSISTENT => true)); 


相关文档:

php 数据过大 内存溢出


Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 92160 bytes) in :\Inetpub\wwwroot04\test.php on line 8
Fatal error: Out of memory (allocated 259,260,416) (tried to allocate 16 bytes) in C:\Inetpub\wwwroot04\test.php on line 8
//ini_set('memory_limit', '-1');
$inde ......

PHP的安装以及配置

安装以及配置
1.       安装Apache-2.2.4(Apache_Dir=D:\myspace\Apache-2.2.4)
2.       解压安装PHP-5.2.11(PHP_Dir=D:\myspace\PHP-5.2.11)
3.       找到PHP-5.2.11下的php.ini-dist,改名为php.ini
4.  &nb ......

PHP 无限分类

<?php
//作者:梁文平 http://www.tyasp.net
session_start();
if($_SESSION["username"]!="admin")
{
echo("<mce:script type="text/javascript"><!--
alert("操作超时!请重新登陆...");window.location.href="../index.php";
// --></mce:script>");
//header("refresh:0;url=../"); ......

PHP中的魔术方法

PHP中有下列称之为魔术方法(magic method)的函数:__construct, __destruct ,
__call, __callStatic,__get, __set, __isset, __unset , __sleep, __wakeup,
__toString, __set_state, __clone and __autoload,本文使用__call为实现一个身份验证的简单实例,代码如下: 代码<?php
    interfa ......

MySQL常用语句

/*查询数据库*/
show databases;
/*创建数据库*/
create database dengheping;
/*使用数据库*/
use dengheping;
/*创建表*/
create table user(id int primary key auto_increment,name char(255));
/*查询表*/
show tables;
/*显示表结构*/
desc user;
/*插入字段*/
alter table user add password varchar(6 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号