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

PHP 中使用oracle 环境配置

http://www.oracle.com/technology/global/cn/pub/notes/technote_php_instant.html
为 Linux 和 Windows 安装 PHP 和 Oracle 10g Instant Client
作者:Christopher Jones,甲骨文公司的咨询技术人员
发布日期:2004 年 12 月
Oracle 10g Instant Client(免费下载)是PHP 与远程 Oracle 数据库连接的最简单方式,它只需要安装三个库。
PHP 访问 Oracle 的当前 API 所使用的 Instant Client 库称作 OCI8.(此 C 接口的名称最早是在 Oracle8 中引入的。)PHP Oracle 8 函数 可以直接调用 Oracle 8.1.7、9.x 或 10.x,或者也可以为了方便起见,使用可选的抽象类,如 PEAR MDB2 和 ADOdb。
Instant Client 也可以使用老版本的 PHP“oracle”扩展,但它调用不赞成使用的 Oracle API。PHP 界或 Oracle 建议不要使用此扩展进行新的开发。
要在 Apache 上将 Instant Client 与 PHP 4 或 连用,请遵循以下步骤。需要一个现有的 Oracle 数据库;Instant Client 不提供 Oracle 数据库。通常情况下,此数据库将位于其他计算机上。如果数据库位于本地,则 Oracle 组件一般早已可用,从而不需要 Instant Client。
软件需求:
软件
附注
Oracle Instant Client
下载“Instant Client Package - Basic”。在 Linux 上,还应下载“Instant Client Package - SDK”。
Apache HTTPD Server
PHP 界仍推荐 Apache 1.3
PHP — PHP 超文本处理器
4.3 版或更高版本
在 Windows 上启用 PHP OCI8 扩展
Instant Client 二进制文件是 PHP 的 Windows 预构建二进制文件的补充。
下载 PHP 二进制压缩文件(不是安装程序版本)和 Apache。按照 PHP 手册中的 Windows 系统上的安装安装它们。OTN 的开放源代码开发人员中心包含有用背景资料的链接,如“在 Windows 2000/XP 上安装 Oracle、PHP 和 Apache”,它介绍了如何安装传统、完整的 Oracle 10g 版本(Instant Client 不需要此版本)。
继续操作之前检查 PHP 是否正常运行。此阶段未启用 Oracle 支持。
从 OTN 的 Instant Client 页面下载用于 Windows 的 Instant Client Basic 程序包。此压缩文件的大小大约为 30MB。
创建一个子目录(例如,c:\instantclient10_1),然后从压缩文件中复制以下库:
oraociei10.dll
orannzsbb10.dll
oci.dll
这三个文件的总大小大约为 80MB。
要使用 PHP 老版本的“oracle”扩展(在 php.in


相关文档:

Linux + Apache2.0 + Mysql + PHP + phpBB3.0

 Linux + Apache2.0 + Mysql + PHP + phpBB3.0
 1.安包:
   Apache2.0
         #tar -zxf httpd-***.tar.gz -C /usr/local/src/
         #cd /usr/local/src/httpd-***
       ......

PCNTL函数族 PHP多进程编程

php有一组进程控制函数,使得php能在*nix系统中实现跟c一样的创建子进程、使用exec函数执行程序、处理信号等功能。
引用
Process Control support in PHP implements the Unix style of process creation, program execution, signal handling and process termination. Process Control should not be enabled within a ......

PHP多进程协作编程之 popen

使用popen结合SHELL命令也可以实现多进程并发编程。
实例如下:
<?php
//b.php文件
$file = 'testdir/file.txt';
for ($i=0;$i<10;$i++){
    $fp = fopen($file,'a+');
    fputs($fp, $i.'\r\n');
    fclose($fp);
    sleep(1);
}
?> ......

Oracle导入导出数据库

导出数据库:exp 用户名/密码@数据库名 file=盘符:/文件夹/文件名.bmp owner=用户 或 exp 用户名/密码@数据库名 file=盘符:/文件夹/文件名.bmp full=y
导入数据库:imp 用户名/密码@数据库名 file=导出的文件 full=y ......

oracle apache php乱码问题

办法一
select * from V$NLS_PARAMETERS
  $conn = oci_connect('scott', 'donkey', 'demo', 'zhs16gbk');
 while ($dat = oci_fetch_row($cur)) {  
    print_r(iconv('gb2312', 'utf-8', $dat[0]));  //$nickname = mb_convert_encoding($dat[0], 'utf-8', 'gbk');&n ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号