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

php模板技术

站点结构

代码:
站点
  ┗includes
       ┗class.inc
  ┣templet
       ┗index.htm
       ┣list.htm
       ┗content.htm
  ┣index.php
  ┗content.php
库结构

代码:
-- 数据库: `test`
-- 表的结构 `test`
CREATE TABLE `test` (
  `id` smallint(3) NOT NULL auto_increment,
  `name` varchar(10) NOT NULL default '',
  `sex` enum('男','女') NOT NULL default '男',
  `age` smallint(2) NOT NULL default '0',
  `email` varchar(20) NOT NULL default '',
  PRIMARY KEY  (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
--------------- class.inc文件 --------
CODE:
<?
php 
 
class 
mycon
{  
    private 
$myhost

    private 
$myuser

    private 
$mypwd

    function 
mycon
(
$host
=
"localhost"
,
$user
=
"root"
,
$pwd
=
""
){ 
      
$this
->
myhost 

$host

      
$this
->
myuser 

$user

      
$this
->
mypwd 

$pwd

    } 
    function 
connect
(){ 
      return 
mysql_connect
(
$this
->
myhost
,
$this
->
myuser
,
$this
->
mypwd
); 
    } 
  } 

  class 
templet

     private 
$source_file

     function 
get_file
(
$filename
){ 
         
$


相关文档:

解决PHP file_exists 函数不支持中文文件

今天想使用这一句php来判断一个文件是否存在: echo is_file('/var/downloads/donkey/incoming/[当地球停止转动].The.Day.The.Earth.Stood.Still.DVDRip.XviD-DMT.avi')?"true":"false"; 
echo is_file('/var/downloads/donkey/incoming/[当地球停止转动].The.Day.The.Earth.Stood.Still.DVDRip.XviD-DMT.avi')?"t ......

php 日期和时间

PHP提供了大量的内置函数,使开发人员在时间的处理上游刃有余,大大提高了工作效率。我们今天就为学员介绍一些常见的PHP日期和时间函数以及日期和时间的处理。
9.1 常用的日期和时间处理函数
表9-1:常用的日期和时间处理函数
函 数
说  明
checkdate
验证时间函数,判断时间是否有效,有效返回true,否则返回fa ......

[PHP] 新的里程碑 Hush Framework

不知不觉,5月过了大半了,想保持每个月至少给 Blog 添加一些新鲜的文章,也随便给自己的 career 轨迹做一个记录,于是提笔,呵呵~ 今天要介绍一下石头最新的作品 Hush Framework,这个框架是我这两个月的心血之作,本人还是比较满意的,以下会给大家介绍一些这个东东的亮点。这个作品的本意是为公司日后的应用开发提供一个 ......

PHP插入数据库代码,编辑,删除

插入代码
 <?
$action=$_GET['action'];
switch($action){
//添加记录
case"add";
$mail = trim(htmlspecialchars($_POST["mail"]));
$username = trim(htmlspecialchars($_POST["username"]));
$tel = trim(htmlspecialchars($_POST["tel"]));
$fax = trim(htmlspecialchars($_POST["fax"]));
$c ......

PHP用邮件取回忘记密码功能?

wangjimima.php
<form id="form1" name="form1" method="post" action="mailto.php" onSubmit="return CheckForm()">
<input name="username" type="text" class="in" id="username" size="30" onmouseover="fEvent('mouseover',this)" onfocus="fEvent('focus',this)" onblur="fEvent('blur',this)" onmouseout ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号