note 64819 added to ref.pdo-oci
| From: | cursade at hotmail dot com | Date: | Fri, 21 Apr 2006 06:29:14 +0000 |
| Subject: | note 64819 added to ref.pdo-oci | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-108892@lists.php.net to get a copy of this message | ||
if oracle and oracle instant client has been installed,
without db in the same host
For UNIX/LINUXï¼set $LD_LIBRARY_PATH
appent your instant client path and client/lib path to it,
For windows set PATH like this
After set the path ,set TNS_ADMIN everioment ,point to
where tnsnames.ora located.
Then,you can use service name to connect to your Database
Test coding
<?php
$param = $_POST;
$db_username = "youusername";
$db_password = "yourpassword";
$db = "oci:dbname=yoursid";
$conn = new PDO($db,$db_username,$db_password);
$name = $param['module'];
$file = $param['file'];
$stmt = $conn->exec("INSERT INTO AL_MODULE (AL_MODULENAME, AL_MODULEFILE) VALUES
('$name', '$file')");
?>
----
Server IP: 219.239.98.8
Probable Submitter: 218.81.103.141
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/ref.pdo-oci.php
Edit -- http://master.php.net/note/edit/64819
Del: integrated -- http://master.php.net/note/delete/64819/integrated
Del: useless -- http://master.php.net/note/delete/64819/useless
Del: bad code -- http://master.php.net/note/delete/64819/bad+code
Del: spam -- http://master.php.net/note/delete/64819/spam
Del: non-english -- http://master.php.net/note/delete/64819/non-english
Del: in docs -- http://master.php.net/note/delete/64819/in+docs
Del: other reasons-- http://master.php.net/note/delete/64819
Reject -- http://master.php.net/note/reject/64819
Search -- http://master.php.net/manage/user-notes.php