pear install http://creole.phpdb.org/pear/creole-current.tgz
pear install http://creole.phpdb.org/pear/jargon-current.tgz
require_once 'creole/Creole.php';
Warning: main(/creole/Creole.php) [function.main]: failed to open stream: No such file or directory in c:/program files/EasyPHP5/home/dev/test.php on line 2
Fatal error: main() [function.require]: Failed opening required '/creole/Creole.php' (include_path='.;C:/php5/pear') in c:/program files/EasyPHP5/home/dev/test.php on line 2
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "path1;path2"
;include_path = ".;c:/php/includes"
include_path = ".;C:/Program Files/EasyPHP5/php/PEAR"
<?php
require_once 'creole/Creole.php';
$dsn = "mysql://root@localhost/r4";
$conn = Creole::getConnection($dsn);
$rs = $conn->executeQuery("SELECT * FROM user");
while($rs->next())
{
echo $rs->getString("login_name") . " (" . $rs->getInt("id") . ")";
}
?>
Root // Creole的根目录
├─common // 存放了Creole的抽象类
├─drivers
│ ├─mssql
│ │ └─metadata // mssql实现
│ ├─mysql
│ │ └─metadata // mysql实现
│ ├─pgsql
│ │ └─metadata
│ └─sqlite
│ └─metadata
├─metadata // 数据表原始信息类
└─util
└─sql
public function setLimit($v);
public function getLimit();
public function setOffset($v);
public function getOffset();
public function close();
public function execute($sql, $fetchmode = null);
public function getResultSet();
public function executeQuery($sql, $fetchmode = null);
public function executeUpdate($sql);
public function getMoreResults();
public function getConnection();
public function getResource();
public function setFetchmode($mode);
public function getFetchmode();
public function isIgnoreAssocCase();
public function next();
public function previous();
public function relative($offset);
public function absolute($pos);
public function seek($rownum);
public function first();
public function last();
public function beforeFirst();
public function afterLast();
public function isAfterLast();
public function isBeforeFirst();
public function getCursorPos();
public function getRow();
public function getRecordCount();
public function close();
public function get($column);
public function getArray($column);
public function getBoolean($column);
public function getBlob($column);
public function getClob($column);
public function getDate($column, $format = '%x');
public function getFloat($column);
public function getInt($column);
public function getString($column);
public function getTime($column, $format = '%X');
public function getTimestamp($column, $format = 'Y-m-d H:i:s');
新闻热点
疑难解答
图片精选