Provides various official and user-released code examples. For code reference, you are welcome to learn how to install the OCI8 extension in PHP.
Foresight
Before installing the oci8 extension, you must determine whether your oracle database is on a local host. If you want to remotely access oracle, you must first install the Oracle Instant Client
Install Oracle Instant Client
Details: http://www.appryan.com/2016/01/07/php-oci8
Install oci8
Note the version before installation. Currently, 2.1.0 is compiled in php7. If the php version is 5.2 ~ Between 5.6, select 2.0.10
$ Wget http://pecl.php.net/get/oci8-2.0.10.tgz
$ Tar-xf oci8-2.0.10.tgz
$ Oci8-2.0.10 cd
$ Phpize
$. /Configure -- with-oci8 = shared, instantclient,/usr/lib/oracle/12.1/client64/lib -- with-php-config =/path/to/php/bin/php-config
$ Make
$ Make test
$ Make install
Details: http://www.appryan.com/2016/01/07/php-oci8
AD: truly free, domain name + VM + enterprise mailbox = 0 RMB