-
- if ($conn=OCILogon("kai","fjelite","linux"))
- { echo "SUCCESS ! Connected to database/n";
- }
- else
- {echo "Failed :-( Could not connect to database/n";}
- $stmt = OCIParse($conn,"select tel,AREA from hkh_tel ");
- OCIDefineByName($stmt,"TEL",&$TEL);
- OCIDefineByName($stmt,"AREA",&$AREA);
- OCIExecute($stmt);
- while
- ( // bbs.it-home.org
- OCIFetch($stmt))
- {
- echo "TEL:". $TEL."/t";
- echo "AREA:".$AREA."/n";
- }
- OCIFreeStatement($stmt);
- OCILogoff($conn);
- ?>
-
Copy code
2, plus execution permissions:
-
- chmod 755 /var/www/html/conn_ora.php
-
Copy code
3, local debugging:
-
- /usr/bin/php /var/www/html/conn_ora.php
Copy code
>>>Articles you may be interested in:
A summary of how to connect Access database with php
Three ways to connect PHP to access database
Example of php ADO component connecting to access database
Simple example of php connecting to database
Some summary about php connecting to mssql
Share a PHP class to connect to sql server
PHP connects to mssql database
|