??xml version="1.0" encoding="utf-8" standalone="yes"?>午夜亚洲成人,久久九九热re6这里有精品,亚洲无限乱码一二三四麻http://www.aygfsteel.com/rorely/category/40509.html学习zh-cnFri, 11 Dec 2009 23:59:55 GMTFri, 11 Dec 2009 23:59:55 GMT60转:php环境配置http://www.aygfsteel.com/rorely/archive/2009/12/11/305619.html期待明天期待明天Fri, 11 Dec 2009 10:10:00 GMThttp://www.aygfsteel.com/rorely/archive/2009/12/11/305619.htmlhttp://www.aygfsteel.com/rorely/comments/305619.htmlhttp://www.aygfsteel.com/rorely/archive/2009/12/11/305619.html#Feedback0http://www.aygfsteel.com/rorely/comments/commentRss/305619.htmlhttp://www.aygfsteel.com/rorely/services/trackbacks/305619.htmlphp环境配置 php5 MySQL5 apache2 phpmyadmin ZendOptimizer安装与配|?/h2>
php环境的配|?对于新手来说,l对是一件烦?M遇到q样那样的问?走很多弯?
所以特意写了这个配|文?怿按照以下步骤你一定会成功?错误的地方也希望各位指正.
更多文章 php爱好者站 http://www.phpfans.net

本例是在wiondws XP?
php5.2.1(zip)  
apache2.2.4  
MySQL5.0.37  
phpmyadmin2.10.0.2
ZendOptimizer-3.2.6
的安装与配置
以上资源直接点击下蝲.也可以在本站下蝲?a target="_blank">http://www.phpfans.net/download.php下蝲

/*********************************************
*
* ?? 我不是鱼
* php爱好者站: http://www.phpfans.net
* Email: deng5765@163.com
* ??  http://www.phpfans.net/space/?2
*
*********************************************/

Apache 的安?/font>

1 点击apahce安装?br />

2 接受协议


3 下面3w便填卛_
    apache 监听80 端口.如果iis用了80端口,修改iis端口或者apache端口,以免冲突


4 q里默认的是 typical,点击next.


5 q里可用修改安装路径,注意安装路径不能含中?


6 点击install开始安?br />

7 安装完成后在览器里打入  http://localhost 或?http://127.0.0.1
如果可以看到q个面,证明apache安装成功,已经可以解释静态页面了


MySQL 的安?/font>

1 点击MySQL安装?br />

2 默认是Typical,如果想修改安装\径的话也可以选择custom.
注意:安装mysql的\径中,不能含有中文!


3 点击intall开始安?br />

4 跌注册


5 是否现在配|?MySQL.也可以之后在开始菜单的configuration wizard q行配置.
  q里是现在进行配|?br />

6 选择Detailed Configuration(详细讄),点Nextl箋


7 下面q个选项是选择mysql应用于何U类?W一U是开发服务器,
只用尽量少的内?W二U是普通WEB服务?用中{数量内?
最后一U是q台服务器上面只q行MySQL数据?占用全部的内存.
用户可根据自q需?选择选项.q里只选择开发服务器,点Nextl箋


8 下面是选择数据库用?W一U是多功能用?
把数据库优化成很好的innodb(事务)存储cd和高效率的myisam(非事?存储cd,
W二U是只用于事务处理类?最好的优化innodb,但同时也支持myisam,只有myisam才支持全文烦?br /> 最后一U是单的|络开?适合于简单的应用,只有不支持事务的myisamcd是被支持?
一般选择W一U多功能?


9 下面是选择InnodDB的数据存放位|?一般默认好?不需要改?br />    (如果要修Ҏ据保存\?也可用在安装后修改my.ini的datadir的?


10 下面是选择MySQL允许的最大连接数,W一U是最?0个连接ƈ发数,
W二U是最?00个ƈ发连接数,最?一U是自定?你可以根据自q需要选择.
q里选择W一?br />

11 下面是是否运行网l链?q里选择复选框.数据库监听的端口,一般默认是3306,
如果Ҏ其他端口,以后q接数据库的时候都要记住修改的端口,否则不能q接mysql数据?
比较ȝ,q里不做修改,用mysq的默认端口:3306


12 q一步设|mysql的默认编?默认是latin1,也是标准的编?W二U是UTF8,W三U是手动讄.
~码是版?.1以上引入?如果要用原来数据库的数据,最好能定原来数据库用的是什么编?如果q里讄的编?br /> 和原来数据库数据的编码不一?在用的时候可能会出现q.使用latin1标准~码


当然我们有需要的?也可以修改它的编?不徏?.


13 q一步是是否要把mysql讄成windows的服?一般选择设成服务,
q样以后可以通过服务中启动和关闭mysql数据库了.推荐Q下面的复选框也勾选上,
q样,在cmd模式?不必非到mysql的bin目录下执行命?在命令行下咨询可以执行文?br />

14 q一步是讄mysql的超U用户密?q个用户非常重要,
对mysql拥有全部的权?误|好q牢记超U用L密码,
下面有个复选框是表C创Z个匿名̎?q会使数据库pȝ不安?
如果有这个需?也请N?


15 点击 Executeq行安装


16 点击finish完成安装


17 我们可以开始用mysql?打开 开始菜?所有程序的 mysql Command line Client,输入密码
出现q个界面说明mysql已经安装好了


可能出现的问题:

如果在第15?出现下图提示

是因Z之前装过mysql.卸蝲时还保留了一些配|文?

点击retry看看是否可以通过。否则点?cancel 退?然后点击开始菜单的 MySQL Server Instance Config Wizard
重新配置 mysql

重复之前的操?W?4步将会出现界面是像下面这?br />
有三个输入密码的地方,你原来装qmysql.
你在W一个文本框输入原来root的密?后面两个文本框输入root的新密码可以了

如果q是不行那就重装一ơMySQL?br /> 重装注意事项Q最好删除原来的所有文?必要的话,可以清一下注册表,
如果你机器上没有其它mysql相关的程?而且一定记得不要保留原有的my.ini文g.
q有是删除原来安装路径下的文g,q删除数据目录下面的ibdata1文g.

更多文章 php爱好者站 http://www.phpfans.net

PHP 的安?/font>

׃php是一个zip文g(非install?,安装较ؓ?br /> 解压p.把解压的 php-5.2.1-Win32 重命名ؓ php5.q复制到C盘目录下.卛_装\径ؓ c:\php5

1  扑ֈphp目录下的 php.ini.recommended (或者php.ini-dist)文g,重命名ؓ php.ini
q复制到pȝ盘的windows目录?以c:\windowsZ).

2  再把php目录下的php5ts.dll,libmysql.dll复制到目?c:\windows\system32?

3  把php5\ext目录下的php_gd2.dll,php_mysql.dll,php_mbstring.dll文g复制到c:\windows\system32?
注意:不要?php_mysql.dll ?php_mssql.dll h
如果没有加蝲 php_gd2.dll  php不能处理图?没有加蝲php_mysql.dll php不支持mysql函数?br /> php_mbstring.dll在后面用phpmyadmin时支持宽字符
更多文章 php爱好者站 http://www.phpfans.net

ZendOptimizer 的安?/font>

Zend Optimizer用优化代码的Ҏ来提高PHP应用E序的执行速度。执行用Zend Optimizer的PHPE序比不使用的要?0%?00%。而且一些用Zend SafeGuard 加密q的文g,必须装了Zend Optimizer才可以运?
注意QZend Optimizer 的安装与否ƈ不媄响php正常q行Q如果你觉得ȝQ这步可以省厅R?/font>

1 点击安装Zend Optimizer


2 接受协议,点击next


3 选定安装路径


4 选定apache本版,我们用的是apache2.2.4,所以这里?apache2.x


5 选定 php.ini 的位|?我们的是?C:\WINDOWS\ ?br />

6 选定apache安装路径.我们的是C:\Program Files\Apache Software Foundation\Apache2.2 .所以要修改q来


7 点击installq行安装


8 点击 ?安装E序自动完成配置和服务器重启.


9 点击 Finish 完成安装


所有东西安装完成后我们再进行配|?

配置phpq关联MySQL

打开c:\windows\php.ini文g

本帖隐藏的内定w要回复才可以览


安装 phpMyAdmin

下蝲得到 phpMyAdmin-2.10.0.2-all-languages.zip,其解压?你网站根目录下ƈ重命名ؓphpMyAdmin,
扑ֈq打开 libraries/config.default.php (有些版本是当前目录的 config.inc.php或?config.defaut.php)
做以下修改:

1 查找 password 有如下两?br /> $cfg['Servers'][$i]['user']          = 'root';     
$cfg['Servers'][$i]['password']      = '';

把你的mysql密码填到$cfg['Servers'][$i]['password']      = ''; 单引号里?

2 搜烦 $cfg['PmaAbsoluteUri'],其后面单引号里的D|ؓ phpMyAdmin 目录路径,如:http://localhost/phpMyAdmin/ Q?

3 搜烦 $cfg['DefaultLang'],其后面单引号里的D|ؓ zh-gb2312 ;

下面q项Ҏ自己需要的~码修改(如果Ҏ据库~码不是很熟悉的不要修改)
4 搜烦 $cfg['DefaultCharset'],其讄?自己所要的~码.

打开览?输入Q?a href="http://localhost/phpMyAdmin/" target="_blank">http://localhost/phpMyAdmin/,Apache ?MySQL 均已启动,
如果出现如下面则phpmyadmin安装完成q可以用了


phpMyAdmin 的具体功?h慢熟?q里不再赘述.

更多文章 php爱好者站 http://www.phpfans.net

l于完了,希望对大家有?谢谢.

[ 本帖最后由 我不是鱼 ?2007-12-5 00:09 ~辑 ]


期待明天 2009-12-11 18:10 发表评论
]]>
php ODBC CZhttp://www.aygfsteel.com/rorely/archive/2009/07/03/285302.html期待明天期待明天Fri, 03 Jul 2009 02:50:00 GMThttp://www.aygfsteel.com/rorely/archive/2009/07/03/285302.htmlhttp://www.aygfsteel.com/rorely/comments/285302.htmlhttp://www.aygfsteel.com/rorely/archive/2009/07/03/285302.html#Feedback0http://www.aygfsteel.com/rorely/comments/commentRss/285302.htmlhttp://www.aygfsteel.com/rorely/services/trackbacks/285302.html     <body>
        <?php
        $conn=odbc_connect('ktv','','');
        if (!$conn){
            exit("Connection Failed: " . $conn);
        }
        $sql="SELECT * FROM tb_authorinfo";
        $rs=odbc_exec($conn,$sql);
        if (!$rs){
            exit("Error in SQL");
        }
        echo "<table><tr>";
        echo "<th>ID</th><th>Name</th><th>Sex</th><th>Birthday</th><th>Genre</th><th>Company</th><th>Recma</th><th>zjm</th><th>DateTime</th>";
        echo "</tr>";
        while (odbc_fetch_row($rs)){
          $id=odbc_result($rs,"authorId");
          $name=odbc_result($rs,"authorName");
          $sex=odbc_result($rs,"authorSex");
          $birthday=odbc_result($rs,"authorbirthday");
          $genre=odbc_result($rs,"authorGenre");
          $company=odbc_result($rs,"authorcompany");
          $recma=odbc_result($rs,"authorRecma");
          $zjm=odbc_result($rs,"authorzjm");
          $datetime=odbc_result($rs,"RdateTime");
          echo "<tr><td>$id</td><td>$name</td><td>$sex</td><td>$birthday</td><td>$genre</td><td>$company</td><td>$recma</td><td>$zjm</td><td>$datetime</td>";
          echo "</tr>";
        }
        odbc_close($conn);
        echo "</table>";
        ?>
    </body>
</html>

l果如下Q?br />
IDNameSexBirthdayGenreCompanyRecmazjmDateTime
AU-4122007110244 ?/td> ?/td> 2007-12-04 11:11:33 大陆 武打
Z 2007-12-04 11:47:45
AU-10122007115114 ?/td> 1789-12-10 11:51:14 喜剧 ?/td> XX 2007-12-10 11:51:50
AU-10122007131630 ?/td> 2007-12-10 13:16:30 大陆 l典 ?/td> XL 2007-12-10 13:16:44




期待明天 2009-07-03 10:50 发表评论
]]>
php ODBC数据?/title><link>http://www.aygfsteel.com/rorely/archive/2009/07/03/285288.html</link><dc:creator>期待明天</dc:creator><author>期待明天</author><pubDate>Fri, 03 Jul 2009 02:02:00 GMT</pubDate><guid>http://www.aygfsteel.com/rorely/archive/2009/07/03/285288.html</guid><wfw:comment>http://www.aygfsteel.com/rorely/comments/285288.html</wfw:comment><comments>http://www.aygfsteel.com/rorely/archive/2009/07/03/285288.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/rorely/comments/commentRss/285288.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/rorely/services/trackbacks/285288.html</trackback:ping><description><![CDATA[ODBC 指的是(Application Programming InterfaceQAPIQ,使我们有能力q接到某个数据源Q比如一?MS Access 数据库)?br /> <br /> 创徏 ODBC q接<br /> 通过一?ODBC q接Q您可以q接到您的网l中的Q何计机上的M数据库,只要 ODBC q接是可用的?br /> <br /> q是创徏到达 MS Access 数据?ODBC q接的方法:<br /> <br />    1. 在控刉板中打开理工具<br />    2. 双击其中的数据源 (ODBC) 图标<br />    3. 选择pȝ DSN 选项?br />    4. 点击pȝ DSN 选项卡中?#8220;d”按钮<br />    5. 选择 Microsoft Access Driver。点d成?br />    6. 在下一个界面,点击“选择”来定位数据库?br />    7. 个数据库取一个数据源?(DSN)?br />    8. 点击定?br /> q接?ODBC<br /> odbc_connect() 函数用于q接?ODBC 数据源。该函数有四个参敎ͼ数据源名、用户名、密码以及可选的指针cd参数?br /> odbc_exec() 函数用于执行 SQL 语句?br /> odbc_close()关闭q接<br /> <br /> <img src ="http://www.aygfsteel.com/rorely/aggbug/285288.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/rorely/" target="_blank">期待明天</a> 2009-07-03 10:02 <a href="http://www.aygfsteel.com/rorely/archive/2009/07/03/285288.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>php mysqli多个查询http://www.aygfsteel.com/rorely/archive/2009/07/02/285196.html期待明天期待明天Thu, 02 Jul 2009 07:56:00 GMThttp://www.aygfsteel.com/rorely/archive/2009/07/02/285196.htmlhttp://www.aygfsteel.com/rorely/comments/285196.htmlhttp://www.aygfsteel.com/rorely/archive/2009/07/02/285196.html#Feedback0http://www.aygfsteel.com/rorely/comments/commentRss/285196.htmlhttp://www.aygfsteel.com/rorely/services/trackbacks/285196.html mysqli_multi_query(mysqli link,string query)q箋执行多次查询Q是Zq程?br /> msyqli_more_results(mysqli link)主要定q回的结果集是否有其他的l果?br /> mysqli_next_result(mysqli link)获取下一个结果集
CZQ?br /> <?php
    #q接数据?br />     $link=mysqli_connect("localhost","root","root");    
    #选择数据?br />     $link->select_db("rorely") or die("could not find database");
    #查询数据?br />     if($link->multi_query("select * from test;select name ,age ,sex,address from test")){
        do{
            $result=$link->store_result();
            while($row=$result->fetch_row()){
                echo "$row[0],$row[1],$row[2],$row[3]<br>";
            }
            if($link->more_results()) echo "**********<br>";
        }while($link->next_result());
    }
$link->close();
    
?>

l果如下Q?br /> 1,Jane,26,female
3,Tome,21,male
4,Lily,25,female
5,Lucy,25,female
6,Jim,22,male
7,Jim,22,male
8,Jim,22,male
9,Jim,22,male
10,Jim,22,male
11,Jim,22,male
12,Jim,22,male
13,Jniu,22,female
14,Jim,22,male
15,Jim,22,male
18,Jim,22,male
20,Jim,22,male
78,lili,22,female
79,hj,30,male
80,hj,30,male
**********
Jane,26,female,wenming cun 123#
Tome,21,male,wenming cun 32#
Lily,25,female,wenming cun 2#
Lucy,25,female,wenming cun 2#
Jim,22,male,wenmin cun 45#
Jim,22,male,wenmin cun 45#
Jim,22,male,wenmin cun 45#
Jim,22,male,wenmin cun 45#
Jim,22,male,wenmin cun 45#
Jim,22,male,wenmin cun 45#
Jim,22,male,wenmin cun 45#
Jniu,22,female,address
Jim,22,male,wenmin cun 45#
Jim,22,male,wenmin cun 45#
Jim,22,male,wenmin cun 45#
Jim,22,male,wenmin cun 45#
lili,22,female,wenming cun 23#
hj,30,male,wenming cun 23#
hj,30,male,wenming cun 23#


期待明天 2009-07-02 15:56 发表评论
]]>
php mysqli扩展?/title><link>http://www.aygfsteel.com/rorely/archive/2009/07/02/285190.html</link><dc:creator>期待明天</dc:creator><author>期待明天</author><pubDate>Thu, 02 Jul 2009 07:37:00 GMT</pubDate><guid>http://www.aygfsteel.com/rorely/archive/2009/07/02/285190.html</guid><wfw:comment>http://www.aygfsteel.com/rorely/comments/285190.html</wfw:comment><comments>http://www.aygfsteel.com/rorely/archive/2009/07/02/285190.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/rorely/comments/commentRss/285190.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/rorely/services/trackbacks/285190.html</trackback:ping><description><![CDATA[CZQ?br /> <?php<br />     #q接数据?br />     $link=mysqli_connect("localhost","root","root");    <br />     #选择数据?br />     $link->select_db("rorely") or die("could not find database");<br />     #查询数据?br />     $result=$link->query("select * from test");<br />     #输出数据库表各个记录的内?br />     while($row=mysqli_fetch_object($result)){<br />         echo $row->id."  ".$row->name."  ".$row->age."    ".$row->sex."  ".$row->address."<hr>";<br />     }<br />     #关闭数据?br />     mysqli_close($link);<br /> ?><br /> 1 Jane 26 female wenming cun 123#<hr /> 3 Tome 21 male wenming cun 32#<hr /> 4 Lily 25 female wenming cun 2#<hr /> 5 Lucy 25 female wenming cun 2#<hr /> 6 Jim 22 male wenmin cun 45#<hr /> 7 Jim 22 male wenmin cun 45#<hr /> 8 Jim 22 male wenmin cun 45#<hr /> 9 Jim 22 male wenmin cun 45#<hr /> 10 Jim 22 male wenmin cun 45#<hr /> 11 Jim 22 male wenmin cun 45#<hr /> 12 Jim 22 male wenmin cun 45#<hr /> 13 Jniu 22 female address<hr /> 14 Jim 22 male wenmin cun 45#<hr /> 15 Jim 22 male wenmin cun 45#<hr /> 18 Jim 22 male wenmin cun 45#<hr /> 20 Jim 22 male wenmin cun 45#<hr /> 78 lili 22 female wenming cun 23#<hr /> 79 hj 30 male wenming cun 23#<hr /> 80 hj 30 male wenming cun 23#<br /> <br /> <img src ="http://www.aygfsteel.com/rorely/aggbug/285190.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/rorely/" target="_blank">期待明天</a> 2009-07-02 15:37 <a href="http://www.aygfsteel.com/rorely/archive/2009/07/02/285190.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>php 辅助函数功能http://www.aygfsteel.com/rorely/archive/2009/07/02/285178.html期待明天期待明天Thu, 02 Jul 2009 06:52:00 GMThttp://www.aygfsteel.com/rorely/archive/2009/07/02/285178.htmlhttp://www.aygfsteel.com/rorely/comments/285178.htmlhttp://www.aygfsteel.com/rorely/archive/2009/07/02/285178.html#Feedback0http://www.aygfsteel.com/rorely/comments/commentRss/285178.htmlhttp://www.aygfsteel.com/rorely/services/trackbacks/285178.html mysql_client_encoding()
mysql_get_server_info()
mysql_get_host_info()
mysql_get_client_info()
mysql_stat()

CZQ?br /> <?php
    $link=mysql_connect("localhost","root","root") or die("couldn't connect:".mysql_error());
    echo "字符集的名称Q?".mysql_client_encoding()."<br>";
    echo "mysql服务器信息:  ".mysql_get_server_info()."<br>";
    echo "mysqlL信息Q?nbsp; ".mysql_get_host_info()."<br>";
    echo "mysql客户Z息:  ".mysql_get_client_info()."<br>";
    echo "当前pȝ的状态:  ".mysql_stat()."<br>";
    mysql_close();
?>

l果Q?br /> 字符集的名称Q?latin1
mysql服务器信息: 5.1.34-community
mysqlL信息Q? localhost via TCP/IP
mysql客户Z息: 5.0.51a
? 前系l的状态: Uptime: 2539 Threads: 1 Questions: 17 Slow queries: 0 Opens: 17 Flush tables: 1 Open tables: 1 Queries per second avg: 0.6


期待明天 2009-07-02 14:52 发表评论
]]>
php 获取字段信息http://www.aygfsteel.com/rorely/archive/2009/07/02/285172.html期待明天期待明天Thu, 02 Jul 2009 06:33:00 GMThttp://www.aygfsteel.com/rorely/archive/2009/07/02/285172.htmlhttp://www.aygfsteel.com/rorely/comments/285172.htmlhttp://www.aygfsteel.com/rorely/archive/2009/07/02/285172.html#Feedback0http://www.aygfsteel.com/rorely/comments/commentRss/285172.htmlhttp://www.aygfsteel.com/rorely/services/trackbacks/285172.html mysql_fetch_field()
mysql_num_fields()
mysql_list_fields()
mysql_field_flags()
mysql_field_len()
mysql_field_name()
mysql_field_type()
mysql_field_table()
注意Q字D늚属性有Qname ,table,max_length,not_null,primary_key,
unique_key,multiple_key,numeric,blob,type,unsigned,zerofill

CZQ?br /> <?php
    $link=mysql_connect("localhost","root","root") or die("couldn't connect:".mysql_error());
    mysql_select_db("rorely");
    $result=mysql_query("select * from test")or die("query failed:".mysql_error());
    for($i=0;$i<mysql_num_fields($result);$i++){
        $meta=mysql_fetch_field($result);
        if(!$meta) echo "没有字段信息.<br>";
        echo "<pre>".$meta->name."<br>".$meta->type."<br>".$meta->max_length."<hr></pre>";
    }
    mysql_free_result($result);
    
?>

l果如下Q?br />
id
int
2
name
string
4
age
int
2
sex
string
6
address
string
16



期待明天 2009-07-02 14:33 发表评论
]]>
php 数据库高U操?/title><link>http://www.aygfsteel.com/rorely/archive/2009/07/02/285054.html</link><dc:creator>期待明天</dc:creator><author>期待明天</author><pubDate>Thu, 02 Jul 2009 01:02:00 GMT</pubDate><guid>http://www.aygfsteel.com/rorely/archive/2009/07/02/285054.html</guid><wfw:comment>http://www.aygfsteel.com/rorely/comments/285054.html</wfw:comment><comments>http://www.aygfsteel.com/rorely/archive/2009/07/02/285054.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/rorely/comments/commentRss/285054.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/rorely/services/trackbacks/285054.html</trackback:ping><description><![CDATA[数据库高U操?br /> (1)获取报错信息mysql_error(),mysql_errno()<br /> string mysql_error([resource $link_identifier]);q回上一个mysql函数的错误文本,如果没有出错则返回空字符?br /> int mysql_errno([resource $link_identifier]);q回上一个mysql函数的错误号码,如果没有出错则返?<br /> 例如Q选择一个不存在的数据库会出错,在一个已l存在的数据库中Q操作一个不存在的表也会出错?br /> <br /> (2)获取数据库和表的信息<br /> mysql_list_dbs(),<br /> mysql_db_name(),<br /> mysql_list_tables(),<br /> mysql_tablename()<br /> 具体用法:<br /> resource mysql_list_dbs([resource $link_identifier])<br /> string mysql_db_name(resource $result,int $row[,mixed $field])<br /> resource mysql_list_tables(string $databaseName[,resource $link_identifier])<br /> string mysql_tablename(resource $result,int $i)<br /> (3)<br /> ▼mysql_free_result()释放内存<br /> ▼mysql_num_rows()判断l果指针中所指记录的个数<br /> <?php<br />     #q接数据?br />     $link=mysql_connect("localhost","root","root");<br />     //选择数据?-不存在的数据库,出错<br />     mysql_select_db("noexistentdb");<br />     echo mysql_error()."<br>";<br /> <br />     mysql_select_db("rorely");<br />     #查询不存在的表,出错<br />     mysql_query("select * from noexistenttable");<br />     echo mysql_error()."<hr>";<br /> <br />     #输出数据库列?br />     $db_list=mysql_list_dbs($link);<br />     while($row=mysql_fetch_object($db_list)) echo $row->Database."<br>";<br />     echo"<hr>";<br /> <br />     #输出数据库列表中所有数据库的名U?br />     $i=0;<br />     $count=mysql_num_rows($db_list);<br />     while($i<$count){<br />         echo mysql_db_name($db_list,$i)."<br>";<br />         $i++;<br />     }<br />     echo"<hr>";<br /> <br />     #输出数据库列表中所有的所有表mysql_list_tables(dbname)<br />     $result=mysql_list_tables("mysql");<br />     if(!$result) {<br />         print "DB error,could not list tables<br>";<br />         print "MySQL error:".mysql_error();<br />         exit;<br />     }<br />     while($row=mysql_fetch_row($result))<br />         print "Table:$row[0].<br>";<br />         <br />     mysql_free_result($result);<br />     echo"<hr>";<br /> <br />     #输出数据库表mysql_tablename(resource)<br />     $result=mysql_list_tables("rorely");<br />     for($i=0;$i<mysql_num_rows($result);$i++){<br />         printf("Table:%s<br>",mysql_tablename($result,$i));<br />     }<br />     mysql_free_result($result);<br /> ?><br /> <br /> 输出l果如下Q?br /> Unknown database 'noexistentdb'<br /> Table 'rorely.noexistenttable' doesn't exist<hr /> information_schema<br /> mysql<br /> rorely<br /> test<br /> <hr /> information_schema<br /> mysql<br /> rorely<br /> test<br /> <hr /> Table:columns_priv.<br /> Table:db.<br /> Table:event.<br /> Table:func.<br /> Table:general_log.<br /> Table:help_category.<br /> Table:help_keyword.<br /> Table:help_relation.<br /> Table:help_topic.<br /> Table:host.<br /> Table:ndb_binlog_index.<br /> Table:plugin.<br /> Table:proc.<br /> Table:procs_priv.<br /> Table:servers.<br /> Table:slow_log.<br /> Table:tables_priv.<br /> Table:time_zone.<br /> Table:time_zone_leap_second.<br /> Table:time_zone_name.<br /> Table:time_zone_transition.<br /> Table:time_zone_transition_type.<br /> Table:user.<br /> <hr /> Table:test<br /> <img src ="http://www.aygfsteel.com/rorely/aggbug/285054.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/rorely/" target="_blank">期待明天</a> 2009-07-02 09:02 <a href="http://www.aygfsteel.com/rorely/archive/2009/07/02/285054.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>php 昄数据表记?/title><link>http://www.aygfsteel.com/rorely/archive/2009/07/01/284958.html</link><dc:creator>期待明天</dc:creator><author>期待明天</author><pubDate>Wed, 01 Jul 2009 07:51:00 GMT</pubDate><guid>http://www.aygfsteel.com/rorely/archive/2009/07/01/284958.html</guid><wfw:comment>http://www.aygfsteel.com/rorely/comments/284958.html</wfw:comment><comments>http://www.aygfsteel.com/rorely/archive/2009/07/01/284958.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/rorely/comments/commentRss/284958.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/rorely/services/trackbacks/284958.html</trackback:ping><description><![CDATA[processShowData.php<br /> <html><br />     <head><br />         <title>查询数据库表信息</title><br />     </head><br />     <body><br />         <center><br />             <form name="myForm" action="processShowData.php"><br />                 <table  border="1" cellspacing="0" cellpadding="0"><br />                     <caption>学生一览表</caption><br />                         <th>学号</th><br />                         <th>姓名</th><br />                         <th>q龄</th><br />                         <th>性别</th><br />                         <th>地址</th><br />                         <?php<br />                             $link=mysql_connect("localhost","root","root");<br />                             mysql_select_db("rorely");<br />                             $exec="select * from test";<br />                             $result=mysql_query($exec);<br />                             while($rs=mysql_fetch_object($result)){<br />                                 $id=$rs->id;<br />                                 $name=$rs->name;<br />                                 $age=$rs->age;<br />                                 $sex=$rs->sex;<br />                                 $address=$rs->address;                    <br />                         ?><br />                     <tr align="center"><br />                     <td><?php echo $id ?></td><br />                     <td><?php echo $name ?></td><br />                     <td><?php echo $age ?></td><br />                     <td><?php echo $sex ?></td><br />                     <td><?php echo $address ?></td><br />                 </tr><br />                 <?php<br />                     }<br />                     mysql_close();<br />                 ?><br />                 </table><br />             </form><br />         </center><br />     </body><br /> </html><br /> <br /> l果如下Q?br /> <table border="1" cellpadding="0" cellspacing="0"> <tbody> <tr> <th>学号</th> <th>姓名</th> <th>q龄</th> <th>性别</th> <th>地址</th> </tr> <tr align="center"> <td>1</td> <td>Jane</td> <td>26</td> <td>female</td> <td>wenming cun 123#</td> </tr> <tr align="center"> <td>3</td> <td>Tome</td> <td>21</td> <td>male</td> <td>wenming cun 32#</td> </tr> <tr align="center"> <td>4</td> <td>Lily</td> <td>25</td> <td>female</td> <td>wenming cun 2#</td> </tr> <tr align="center"> <td>5</td> <td>Lucy</td> <td>25</td> <td>female</td> <td>wenming cun 2#</td> </tr> <tr align="center"> <td>6</td> <td>Jim</td> <td>22</td> <td>male</td> <td>wenmin cun 45#</td> </tr> <tr align="center"> <td>7</td> <td>Jim</td> <td>22</td> <td>male</td> <td>wenmin cun 45#</td> </tr> <tr align="center"> <td>8</td> <td>Jim</td> <td>22</td> <td>male</td> <td>wenmin cun 45#</td> </tr> <tr align="center"> <td>9</td> <td>Jim</td> <td>22</td> <td>male</td> <td>wenmin cun 45#</td> </tr> <tr align="center"> <td>10</td> <td>Jim</td> <td>22</td> <td>male</td> <td>wenmin cun 45#</td> </tr> <tr align="center"> <td>11</td> <td>Jim</td> <td>22</td> <td>male</td> <td>wenmin cun 45#</td> </tr> <tr align="center"> <td>12</td> <td>Jim</td> <td>22</td> <td>male</td> <td>wenmin cun 45#</td> </tr> <tr align="center"> <td>13</td> <td>Jim</td> <td>22</td> <td>male</td> <td>wenmin cun 45#</td> </tr> <tr align="center"> <td>14</td> <td>Jim</td> <td>22</td> <td>male</td> <td>wenmin cun 45#</td> </tr> <tr align="center"> <td>15</td> <td>Jim</td> <td>22</td> <td>male</td> <td>wenmin cun 45#</td> </tr> <tr align="center"> <td>18</td> <td>Jim</td> <td>22</td> <td>male</td> <td>wenmin cun 45#</td> </tr> <tr align="center"> <td>20</td> <td>Jim</td> <td>22</td> <td>male</td> <td>wenmin cun 45#</td> </tr> <tr align="center"> <td>78</td> <td>lili</td> <td>22</td> <td>female</td> <td>wenming cun 23#</td> </tr> <tr align="center"> <td>79</td> <td>hj</td> <td>30</td> <td>male</td> <td>wenming cun 23#</td> </tr> <tr align="center"> <td>80</td> <td>hj</td> <td>30</td> <td>male</td> <td>wenming cun 23#</td> </tr> </tbody> </table> <br /> <br /> <img src ="http://www.aygfsteel.com/rorely/aggbug/284958.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/rorely/" target="_blank">期待明天</a> 2009-07-01 15:51 <a href="http://www.aygfsteel.com/rorely/archive/2009/07/01/284958.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>php 删除数据库表中的记录http://www.aygfsteel.com/rorely/archive/2009/07/01/284956.html期待明天期待明天Wed, 01 Jul 2009 07:30:00 GMThttp://www.aygfsteel.com/rorely/archive/2009/07/01/284956.htmlhttp://www.aygfsteel.com/rorely/comments/284956.htmlhttp://www.aygfsteel.com/rorely/archive/2009/07/01/284956.html#Feedback0http://www.aygfsteel.com/rorely/comments/commentRss/284956.htmlhttp://www.aygfsteel.com/rorely/services/trackbacks/284956.html <html>
    <head>
    </head>
    <body>
        <form name="frm" action="processDeleteData.php" method="post">
            <table border="1" align="center" cellspacing="0" cellpadding="0">
                <caption>学生一览表</caption>
                <th>选项</th>
                <th>学号</th>
                <th>姓名</th>
                <th>q龄</th>
                <th>性别</th>
                <th>地址</th>
                <?php
                    $link=mysql_connect("localhost","root","root");
                    mysql_select_db("rorely");
                    $exec="select * from test";
                    $result=mysql_query($exec);
                    while($rs=mysql_fetch_object($result)){
                        $id=$rs->id;
                        $name=$rs->name;
                        $age=$rs->age;
                        $sex=$rs->sex;
                        $address=$rs->address;                    
                ?>
                <tr align="center">
                    <td><input type="radio" name="del" value=<?php echo $id ?> /></td>
                    <td><?php echo $id ?></td>
                    <td><?php echo $name ?></td>
                    <td><?php echo $age ?></td>
                    <td><?php echo $sex ?></td>
                    <td><?php echo $address ?></td>
                </tr>
                <?php
                    }
                    mysql_close();
                ?>
            </table>
            <center><input type="submit" value="删除" /></center>
        </form>
    </body>
</html>

processDeleteData.php处理删除面
<?php
    $link=mysql_connect("localhost","root","root");
    mysql_select_db("rorely");
    $id=$_POST['del'];
    $exec="delete from test where id=$id";
    $result=mysql_query($exec);
    if((mysql_affected_rows()==0)||(mysql_affected_rows()==-1))
        echo"没有扑ֈ记录Q或者删除时产生错误Q?;
    else echo"学生已删除!";
    mysql_close();
?>
<a href="deleteData.php">q回删除面</a>



期待明天 2009-07-01 15:30 发表评论
]]>
php 向数据库表中插入数据http://www.aygfsteel.com/rorely/archive/2009/07/01/284940.html期待明天期待明天Wed, 01 Jul 2009 06:03:00 GMThttp://www.aygfsteel.com/rorely/archive/2009/07/01/284940.htmlhttp://www.aygfsteel.com/rorely/comments/284940.htmlhttp://www.aygfsteel.com/rorely/archive/2009/07/01/284940.html#Feedback0http://www.aygfsteel.com/rorely/comments/commentRss/284940.htmlhttp://www.aygfsteel.com/rorely/services/trackbacks/284940.html <html>
    <head>
        <title>向数据库中插入数?lt;/title>
    </head>
    <body>
        <center>
            <form name="myForm" method="post" action="processInsertData.php">
                <table bgcolor="cyan">
                    <tr>
                        <td>学号</td>
                        <td><input type="text" name="txtId"  /></td>
                    </tr>
                    <tr>
                        <td>姓名</td>
                        <td><input type="text" name="txtName" /></td>
                    </tr>
                    <tr>
                        <td>q龄</td>
                        <td><input type="text" name="txtAge"></td>
                    </tr>
                    <tr>
                        <td>性别</td>
                        <td>
                            <select name="sSex">
                                <option value="male">male</option>
                                <option value="female">female</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>地址</td>
                        <td><input type="text" name="txtAddress"/></td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center">
                            <input type="submit" name="submit" value="d"/>
                            <input type="reset" name="reset" value="重置">
                        </td>
                    </tr>
                </table>
            </form>
        </center>
    </body>
</html>


处理数据插入面processInsertData.php
<?php
    $link=mysql_connect("localhost","root","root");
    mysql_select_db("rorely");
    $id=$_POST['txtId']|null;
    $name=$_POST['txtName'];
    $age=$_POST['txtAge'];
    $sex=$_POST['sSex'];
    $address=$_POST['txtAddress'];

    $exec="insert into test values($id,'$name',$age,'$sex','$address')";
    $result=mysql_query($exec);
    if($result) echo "学生已添加到数据表中<br>";
    else echo "该学生没有添加进数据表,请重新输入?lt;br>";
    mysql_close();
?>
<a href="insertData.php">q回d面</a>



期待明天 2009-07-01 14:03 发表评论
]]>
php 建立数据库连?/title><link>http://www.aygfsteel.com/rorely/archive/2009/07/01/284897.html</link><dc:creator>期待明天</dc:creator><author>期待明天</author><pubDate>Wed, 01 Jul 2009 03:00:00 GMT</pubDate><guid>http://www.aygfsteel.com/rorely/archive/2009/07/01/284897.html</guid><wfw:comment>http://www.aygfsteel.com/rorely/comments/284897.html</wfw:comment><comments>http://www.aygfsteel.com/rorely/archive/2009/07/01/284897.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/rorely/comments/commentRss/284897.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/rorely/services/trackbacks/284897.html</trackback:ping><description><![CDATA[(1) 建立q接<br /> (2Q选择数据?br /> (3) 执行SQL语句<br /> (4) 关闭数据库连?br /> <?php<br />     $link=mysql_connect("localhost","root","root");<br />     if($link)echo"q接数据库成功!";<br />     else echo"q接数据库失败!";<br />     <br />     $sele=mysql_select_db("com");<br />     if($sele) echo"选择数据库成功!";<br />     else echo"选择数据库失败!";<br /> <br />     $exec="select * from test";<br />     $result=mysql_query($exec);<br />     echo $result."<br>";<br /> <br />     $exec="insert into test values(null,'Janel',23,'female','wenmin cun 34#')";<br />     $result=mysql_query($exec);<br />     echo $result."<br>";<br />     <br />      mysql_close();<br /> <br /> ?><br /> <br /> <img src ="http://www.aygfsteel.com/rorely/aggbug/284897.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/rorely/" target="_blank">期待明天</a> 2009-07-01 11:00 <a href="http://www.aygfsteel.com/rorely/archive/2009/07/01/284897.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>配置php与mysql的连?php.ini文ghttp://www.aygfsteel.com/rorely/archive/2009/07/01/284884.html期待明天期待明天Wed, 01 Jul 2009 02:13:00 GMThttp://www.aygfsteel.com/rorely/archive/2009/07/01/284884.htmlhttp://www.aygfsteel.com/rorely/comments/284884.htmlhttp://www.aygfsteel.com/rorely/archive/2009/07/01/284884.html#Feedback0http://www.aygfsteel.com/rorely/comments/commentRss/284884.htmlhttp://www.aygfsteel.com/rorely/services/trackbacks/284884.html 配置php与mysql的连?php.ini文g
看加_部分?br />
; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.

;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_ifx.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
;extension=php_mbstring.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_msql.dll
;extension=php_mssql.dll
    extension=/ext/php_mysql.dll
    extension=/ext/php_mysqli.dll

;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_pdo.dll
;extension=php_pdo_firebird.dll
;extension=php_pdo_mssql.dll
;extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_oci8.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
;extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_pspell.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_soap.dll
;extension=php_sockets.dll
;extension=php_sqlite.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_zip.dll


期待明天 2009-07-01 10:13 发表评论
]]>
php shell_exec()与反撇号{h输出l果http://www.aygfsteel.com/rorely/archive/2009/06/30/284782.html期待明天期待明天Tue, 30 Jun 2009 07:50:00 GMThttp://www.aygfsteel.com/rorely/archive/2009/06/30/284782.htmlhttp://www.aygfsteel.com/rorely/comments/284782.htmlhttp://www.aygfsteel.com/rorely/archive/2009/06/30/284782.html#Feedback0http://www.aygfsteel.com/rorely/comments/commentRss/284782.htmlhttp://www.aygfsteel.com/rorely/services/trackbacks/284782.html     #使用反撇P暗示作ؓ命o来执?br />     $result=`date`;
    echo "<p>the server timestamp is: $result</p>";

    echo "<hr color=red>";
    #使用shell_exec()
    $result1=shell_exec("date");
    echo "<p>the server timestamp is: $result1</p>";
?>

输出l果如下Q?br />

the server timestamp is: 当前日期: 2009/06/30 ? 输入新日? (q月?


the server timestamp is: 当前日期: 2009/06/30 ? 输入新日? (q月?





期待明天 2009-06-30 15:50 发表评论
]]>
php file操作--删除I目?/title><link>http://www.aygfsteel.com/rorely/archive/2009/06/30/284775.html</link><dc:creator>期待明天</dc:creator><author>期待明天</author><pubDate>Tue, 30 Jun 2009 07:12:00 GMT</pubDate><guid>http://www.aygfsteel.com/rorely/archive/2009/06/30/284775.html</guid><wfw:comment>http://www.aygfsteel.com/rorely/comments/284775.html</wfw:comment><comments>http://www.aygfsteel.com/rorely/archive/2009/06/30/284775.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/rorely/comments/commentRss/284775.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/rorely/services/trackbacks/284775.html</trackback:ping><description><![CDATA[<?php<br />     #删除I目?br />     function delDir($dir){<br />         if($od=@opendir($dir)){<br />             while(($file=readdir($od))!=false){<br />                 if(($file==".")||($file==".."))continue;<br />                 if(is_dir($dir."/".$file)) delDir($dir."/".$file);<br />                 else unlink($od."/".$file);<br />             }<br />             @closedir($od);<br />             rmdir($dir);<br />             echo $dir." 删除成功Q?lt;br>";<br />         }else echo"can't open ".$dir;<br />     }<br />     $dir="test/";<br />     delDir($dir);    <br /> ?><br /> <br /> q行的结果:<br /> test//testhello/testWorld 删除成功Q?br /> test//testhello 删除成功Q?br /> test/ 删除成功Q?br /> <img src ="http://www.aygfsteel.com/rorely/aggbug/284775.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/rorely/" target="_blank">期待明天</a> 2009-06-30 15:12 <a href="http://www.aygfsteel.com/rorely/archive/2009/06/30/284775.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>php filetype() 文gcdhttp://www.aygfsteel.com/rorely/archive/2009/06/29/284667.html期待明天期待明天Mon, 29 Jun 2009 13:17:00 GMThttp://www.aygfsteel.com/rorely/archive/2009/06/29/284667.htmlhttp://www.aygfsteel.com/rorely/comments/284667.htmlhttp://www.aygfsteel.com/rorely/archive/2009/06/29/284667.html#Feedback0http://www.aygfsteel.com/rorely/comments/commentRss/284667.htmlhttp://www.aygfsteel.com/rorely/services/trackbacks/284667.html
<?php
    #文g名称
    echo basename("file/fileTest.php")."<hr color=red>";
    #文g名称Q不含后~
    echo basename("file/fileTest.php",".php")."<hr color=red>";
    #目录名称
    echo dirname("file/fileTest.php")."<hr color=red>";
    #目录的详l信息,包括文g名,目录名,文g扩展?br />     $paths= pathinfo("file/fileTest.php");
    echo $paths["dirname"]."<hr color=red>";
    echo $paths["basename"]."<hr color=red>";
    echo $paths["extension"]."<hr color=red>";
    echo realpath("file/fileTest.php")."<hr color=red>";
    #获取文gcdQfile
    echo filetype("fileTest.php")."<hr color=red>";
    #获取文gcdQdir
    echo filetype('E:\\Program\\Apache2.2\\htdocs\\file\\')."<hr color=red>";
?>



期待明天 2009-06-29 21:17 发表评论
]]>
php 反射c?/title><link>http://www.aygfsteel.com/rorely/archive/2009/06/28/284477.html</link><dc:creator>期待明天</dc:creator><author>期待明天</author><pubDate>Sun, 28 Jun 2009 07:00:00 GMT</pubDate><guid>http://www.aygfsteel.com/rorely/archive/2009/06/28/284477.html</guid><wfw:comment>http://www.aygfsteel.com/rorely/comments/284477.html</wfw:comment><comments>http://www.aygfsteel.com/rorely/archive/2009/06/28/284477.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/rorely/comments/commentRss/284477.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/rorely/services/trackbacks/284477.html</trackback:ping><description><![CDATA[反射cReflectionClassQ其中包含的Ҏ可以通过下面的方法获取:CZ如下?br /> <br /> <?php<br />     $class=new ReflectionClass("ReflectionClass");<br />     $methods=$class->getMethods();<br />     foreach($methods as $method)<br />         echo $method->getName()."<br>";  <br /> ?><br /> <br /> q行l果如下Q?br /> __clone<br /> export<br /> __construct<br /> __toString<br /> getName<br /> isInternal<br /> isUserDefined<br /> isInstantiable<br /> getFileName<br /> getStartLine<br /> getEndLine<br /> getDocComment<br /> getConstructor<br /> hasMethod<br /> getMethod<br /> getMethods<br /> hasProperty<br /> getProperty<br /> getProperties<br /> hasConstant<br /> getConstants<br /> getConstant<br /> getInterfaces<br /> getInterfaceNames<br /> isInterface<br /> isAbstract<br /> isFinal<br /> getModifiers<br /> isInstance<br /> newInstance<br /> newInstanceArgs<br /> getParentClass<br /> isSubclassOf<br /> getStaticProperties<br /> getStaticPropertyValue<br /> setStaticPropertyValue<br /> getDefaultProperties<br /> isIterateable<br /> implementsInterface<br /> getExtension<br /> getExtensionName<br /> <br /> <br /> <img src ="http://www.aygfsteel.com/rorely/aggbug/284477.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/rorely/" target="_blank">期待明天</a> 2009-06-28 15:00 <a href="http://www.aygfsteel.com/rorely/archive/2009/06/28/284477.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>php 接口--可以多实现?/title><link>http://www.aygfsteel.com/rorely/archive/2009/06/28/284470.html</link><dc:creator>期待明天</dc:creator><author>期待明天</author><pubDate>Sun, 28 Jun 2009 05:56:00 GMT</pubDate><guid>http://www.aygfsteel.com/rorely/archive/2009/06/28/284470.html</guid><wfw:comment>http://www.aygfsteel.com/rorely/comments/284470.html</wfw:comment><comments>http://www.aygfsteel.com/rorely/archive/2009/06/28/284470.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/rorely/comments/commentRss/284470.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/rorely/services/trackbacks/284470.html</trackback:ping><description><![CDATA[接口的创Z用关键字interfaceQ实现接口,使用关键字implements。接口的Ҏ全部是publicҎQ而且没有Ҏ体。一个类可以实现多个接口。示例如下:<br /> <br /> <?php<br />     interface myInterface{<br />         const str="中国你好";<br />         public function getV();<br />         public function getH($name,$value);<br />     }<br /> <br />     interface expressEmotion{<br />         public function getEmotion();<br />     }<br />     class A implements myInterface,expressEmotion{<br />         public function getV(){<br />             echo self::str;<br />         }<br />         public function getH($name,$value){<br />             echo $name.=$value;<br />         }<br />         public function getEmotion(){<br />             echo "<br>心情不错?lt;br>";<br />         }<br />     }<br /> <br />     $a=new A();<br />     $a->getV();<br />     $a->getH("<br>北京","Ƣ迎你!");<br />     $a->getEmotion();<br /> ?><br /> <br /> <br /> <img src ="http://www.aygfsteel.com/rorely/aggbug/284470.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/rorely/" target="_blank">期待明天</a> 2009-06-28 13:56 <a href="http://www.aygfsteel.com/rorely/archive/2009/06/28/284470.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>php cȝ?-单?/title><link>http://www.aygfsteel.com/rorely/archive/2009/06/28/284465.html</link><dc:creator>期待明天</dc:creator><author>期待明天</author><pubDate>Sun, 28 Jun 2009 05:34:00 GMT</pubDate><guid>http://www.aygfsteel.com/rorely/archive/2009/06/28/284465.html</guid><wfw:comment>http://www.aygfsteel.com/rorely/comments/284465.html</wfw:comment><comments>http://www.aygfsteel.com/rorely/archive/2009/06/28/284465.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/rorely/comments/commentRss/284465.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/rorely/services/trackbacks/284465.html</trackback:ping><description><![CDATA[<?php<br />     class BaseClass{<br />         function __construct(){<br />             echo "<br><font color=red>this is the base class constructor</font><br>";<br />         }<br />     }<br />     class SubClass extends BaseClass{<br />         function __construct(){<br /> #子类调用父类构造方法的两种Q父cd::__construct();parent::__construct()<br />             BaseClass::__construct();<br />             parent::__construct();<br />             echo" <br> this is the sub class constructor<br>";<br />         }<br />     }<br />     echo "declare an instance of BaseClass<br>";<br />     $obj=new BaseClass();<br /> <br />     echo "declare an instance of SubClass<br>";<br />     $obj1=new SubClass();<br /> ?><br /> <img src ="http://www.aygfsteel.com/rorely/aggbug/284465.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/rorely/" target="_blank">期待明天</a> 2009-06-28 13:34 <a href="http://www.aygfsteel.com/rorely/archive/2009/06/28/284465.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>php 拯对象http://www.aygfsteel.com/rorely/archive/2009/06/28/284454.html期待明天期待明天Sun, 28 Jun 2009 02:59:00 GMThttp://www.aygfsteel.com/rorely/archive/2009/06/28/284454.htmlhttp://www.aygfsteel.com/rorely/comments/284454.htmlhttp://www.aygfsteel.com/rorely/archive/2009/06/28/284454.html#Feedback0http://www.aygfsteel.com/rorely/comments/commentRss/284454.htmlhttp://www.aygfsteel.com/rorely/services/trackbacks/284454.html
<?php
    class Foo{
        private $x;
        private $y;
        public function setX($x){
            $this->x=$x;
        }
        public function setY($y){
            $this->y=$y;
        }
        public function getX(){
            return $this->x;
        }
        public function getY(){
            return $this->y;
        }
    }

    $foo1=new Foo;
    $foo1->setX(3);
    $foo1->setY(4);

    $foo2=clone $foo1;
    $foo2->setX(4);

    if($foo1->getX()!=$foo2->getX()) echo "they are not equal";
   
    function displayObj(Foo $foo){
        echo "<br>对象的gؓQ?lt;br>";
        echo $foo->getX()."<br>";
        echo $foo->getY()."<br>";

    }
    displayObj($foo1);
    displayObj($foo2);
?>



期待明天 2009-06-28 10:59 发表评论
]]>
php构造函数和析构函数http://www.aygfsteel.com/rorely/archive/2009/06/28/284445.html期待明天期待明天Sun, 28 Jun 2009 01:53:00 GMThttp://www.aygfsteel.com/rorely/archive/2009/06/28/284445.htmlhttp://www.aygfsteel.com/rorely/comments/284445.htmlhttp://www.aygfsteel.com/rorely/archive/2009/06/28/284445.html#Feedback0http://www.aygfsteel.com/rorely/comments/commentRss/284445.htmlhttp://www.aygfsteel.com/rorely/services/trackbacks/284445.html 析构函数:destructor

在php5.1中,构造函数统一命名为:
function __construct(){
    #函数?br /> }

析构函数l一命名为:
function __destruct(){
    #函数?br /> }

注意Qconstruct和destruct之前有两个下划线Q不是一?br /> 下面l出一个构造函数的CZQ?br /> <?php
    class Car{
        private $color;
        private $size;
        private $price;
        function __construct(){
            $this->color="red";
            $this->size=4;
            $this->price=30000;
        }

        public function display(){
            echo $this->color."<br>";
            echo $this->size."<br>";
            echo $this->price."<br>";
        }
    }
    $car=new Car();
    $car->display();
?>





期待明天 2009-06-28 09:53 发表评论
]]>
php?涉及的类型提C?/title><link>http://www.aygfsteel.com/rorely/archive/2009/06/28/284443.html</link><dc:creator>期待明天</dc:creator><author>期待明天</author><pubDate>Sun, 28 Jun 2009 01:46:00 GMT</pubDate><guid>http://www.aygfsteel.com/rorely/archive/2009/06/28/284443.html</guid><wfw:comment>http://www.aygfsteel.com/rorely/comments/284443.html</wfw:comment><comments>http://www.aygfsteel.com/rorely/archive/2009/06/28/284443.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/rorely/comments/commentRss/284443.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/rorely/services/trackbacks/284443.html</trackback:ping><description><![CDATA[<span style="color: #ff0000;"></span>在php中,只有对象cd和数l类型,可以在定义函数的时候,在Ş参中dcd提示。例如:<br /> <?php<br />     class MyClass{<br />         public $var="q里用了cd提示";<br />     }<br /> #cd提示Q只能够是对象和数组cd?br /> #对象<br />     function MyFunction(<u><strong><span style="color: #ff0000;"><u><strong>MyClass</strong></u></span></strong></u> $foo){<br />         echo $foo->var;<br />     }<br />     $myClass=new MyClass;<br />     MyFunction($myClass);<br /> #数组<br />     $arr=array("Jane","Jill","Lily","Tom");<br />     function displayArray(<u><strong></strong><strong><span style="color: #ff0000;">array</span></strong></u> $a){<br />         for($i=0;$i<count($a);$i++)<br />             echo $a[$i]."<br>";<br />     }<br /> <br />     displayArray($arr);<br /> ?><br /> <br /> <img src ="http://www.aygfsteel.com/rorely/aggbug/284443.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/rorely/" target="_blank">期待明天</a> 2009-06-28 09:46 <a href="http://www.aygfsteel.com/rorely/archive/2009/06/28/284443.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> վ֩ģ壺 <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">կ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank">Ϣ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ͼ</a>| <a href="http://" target="_blank">ͨ</a>| <a href="http://" target="_blank">բ</a>| <a href="http://" target="_blank">ʯɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Ӧ</a>| <a href="http://" target="_blank">ͨ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">˫</a>| <a href="http://" target="_blank">Ʊ</a>| <a href="http://" target="_blank">ͤ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">â</a>| <a href="http://" target="_blank"></a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>