Your code willbe more robust WHEN you parse your string, because you can detect invalid connection information
Connect to Oracle with PHP using oci8 module and a dynamic connection string
문제
I would like to connect to an Oracle DB from PHP using the oci8 module (oci_connect). I know how to do this, but the problem is I would like to do it dynamically based on a connection string of type
"oci8://user_name:password@tns_name"
The oci_connect method needs the user_name, password and the tns_name (called connection string) separately. I would prefer not to parse my connection string to make the code more robust.
Is there a way to do this ?
By the way, I'm using PHP 5.2.5 and Oracle 10g and I'm using the oci8 module to help me call a stored procedure.
해결책
제휴하지 않습니다 StackOverflow