以下是错误消息:
Fatal error: Call to undefined function pg_escape_string() in ...
我已经通过自制软件安装了php,postgresql和pdo_pgsql
> php -v
PHP 5.5.30 (cli) (built: Oct 3 2015 23:48:03)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
> postgres --version
postgres (PostgreSQL) 9.4.5
> sw_vers
ProductName: Mac OS X
ProductVersion: 10.11.1
BuildVersion: 15B42
> php -i
pdo_pgsql
PDO Driver for PostgreSQL => enabled
PostgreSQL(libpq) Version => 9.4.4
Module version => 1.0.2
在php中使用postgre的其他功能正常工作(连接,查询,...)