很菜地问一下,PHP里有没有以下几个东西,谢谢各位大虾!

Leemaasn 2004-06-08 10:16:45
1、数据库连接池!
2、持续化!

刚接触PHP,
先问这两个,谢谢各位大虾!
...全文
111 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
xuzuning 2004-06-08
  • 打赏
  • 举报
回复
1、数据库连接池!
没有。连接池是由客户与数据库间的中间层软件提供的如jdbc、odbc。php使用底层函数直接与数据库交互,所以没有,也不需要有

2、持续化!
请把定义说清楚
ccterran 2004-06-08
  • 打赏
  • 举报
回复
持续化等于续列化么?
gucs 2004-06-08
  • 打赏
  • 举报
回复
2、这是php manunal中关于serialize的说明

serialize() returns a string containing a byte-stream representation of value that can be stored anywhere.

This is useful for storing or passing PHP values around without losing their type and structure.

To make the serialized string into a PHP value again, use unserialize(). serialize() handles all types, except the resource-type. You can even serialize() arrays that contain references to itself. References inside the array/object you are serialize()ing will also be stored.

When serializing objects, PHP will attempt to call the member function __sleep() prior to serialization. This is to allow the object to do any last minute clean-up, etc. prior to being serialized. Likewise, when the object is restored using unserialize() the __wakeup() member function is called.



注意这段话:
In PHP 3, object properties will be serialized, but methods are lost. PHP 4 removes that limitation and restores both properties and methods. Please see the Serializing Objects section of Classes and Objects for more information.
gucs 2004-06-08
  • 打赏
  • 举报
回复
1、没有连接池,如果使用mysql,可以使用pconnect,但,有些测试说他的效率不高
Leemaasn 2004-06-08
  • 打赏
  • 举报
回复
谢谢各位,,
难怪我找不到连接池。。。

我是想知道有没有类似CMP、Hibernate之类的持续化概念

谢谢!

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧