1、If a method can be static, declare it static. Speed improvement is by a factor of 4。1、如果一个函数可以声明为静态的,那么就用静态的,速度是改进的一个因素4。2、# Avoid magic like __get, __set, __autoload2、避免使用__get, __set, __autoload等魔术函数3、require_once() is expensive3、require_once()是相当昂贵的。4、Use full paths in includes and requires, less time spent on resolving the OS paths.4、用include和require时,尽量用全路径,可以减少花在解决OS路径的时间5、If you need to find out the time when the scrīpt started executing, $_SERVER[’REQUEST_TIME’] is preferre
.... [阅读全文]
要实现下列功能,请确保 php.ini 中的 com.allow_dcom 选项已设为 true。一、准备工作新建一个ACCESS数据库,并命名为db.mdb,然后在这个数据库中新建一个表 comtest,包含 id 和 title 两个字段,最后随便插入一些数据。二、实现代码 以下为引用的内容: <?php// 就是刚建的数据库$db = 'd:\\wwwroot\\db.mdb'; // 建立连接,并打开$conn = new COM('ADODB.Connection') or die('can not start Active X Data Objects');//$conn->Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=$db");$conn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$db");
.... [阅读全文]
如何创建我们的第一个PHP页面呢?非常简单的!选择我们使用的一个最好的设计工具,当然你也可以 只使用记事本。创建之后记得要保存为扩展名为PHP的文件,然后传到我们的服务器上。在编写PHP程序之前通常我们需要配置我们的环境,也就是说服务器要支持PHP才能行啊一、PHP的基本结构:使用Include函数 以下为引用的内容:<Html> <Head> <title>Your page Subject and domain name</title> 上面内容为我们使用的每个页面的标题,不要动。每个页的头部: 以下为引用的内容:<Meta NAME="" CONTENT="">"" your others meta tag"" your others meta tag"" your others meta tag"&
.... [阅读全文]
以下为引用的内容: //PHP_md5("字符串")define("BITS_TO_A_BYTE",8);define("BYTES_TO_A_WORD",4);define("BITS_TO_A_WORD",32);$m_lOnBits=array(30);$m_l2Power=array(30); function LShift($lValue,$iShiftBits){ if ($iShiftBits==0) return $lValue; if ($iShiftBits==31) { &nbs
.... [阅读全文]
Rich Internet Application 是 Web 2.0 中的新时髦词,并且就 Web 2.0 的实质而言,一个关键组件就是 Adobe Flash。了解如何将 Flash 动画集成到应用程序中,并使用 Ming 库动态生成 Flash 动画。Web 2.0 引入了 Rich Internet Application。但 Rich Internet Application 的含义是什么?通常,它意味着向应用程序中添加具有高度响应能力的交易操作。具体来说,它意味着可以即时更改页面中的小部件、Web 表单和报告,而无需从服务器中检索新页面。一种用于构建 Rich Internet Application(RIA)的方法就是使用动态 HTML(Dynamic HTML,DHTML),它是 Ajax、JavaScript、层叠样式表(Cascading Style Sheet,CSS)和 HTML 的组合(请参阅 参考资料)。但是 DHTML 并不是向 Web 应用程序中添加互动操作的惟一方法。另一种重要方法是使用 Adobe Flash Player,使用它为 Web 站点添加
.... [阅读全文]