php Á´½Óoracle phpµ÷ÓÃoracle´æ´¢¹ý³Ì
phpµ÷ÓÃoracleÐд洢¹ý³Ì############################################################
PHP³ÌÐò·ÃÎÊÊý¾Ý¿â£¬ÍêÈ«¿ÉÒÔʹÓô洢¹ý³Ì£¬ÓÐÈËÈÏΪʹÓô洢¹ý³Ì±ãÓÚά»¤
²»¹ýÈÊÕß¼ûÈÊ£¬ÖÇÕß¼ûÖÇ¡£
ÔÚÕâ¸öÎÊÌâÉÏ£¬Å¼ÈÏΪʹÓô洢¹ý³ÌÒâζ×űØÐëÒªDBAºÍ¿ª·¢ÈËÔ±¸ü½ôÃÜÅäºÏ,Èç¹ûÆäÖÐÒ»·½¸ü±ä£¬ÔòÏÔÈ»ÄÑÒÔά»¤¡£
µ«ÊÇʹÓô洢¹ý³ÌÖÁÉÙÓÐÁ½¸ö×îÃ÷ÏÔµÄÓŵ㣺ËٶȺÍЧÂÊ¡£
ʹÓô洢¹ý³ÌµÄËÙ¶ÈÏÔÈ»¸ü¿ì¡£
ÔÚЧÂÊÉÏ£¬Èç¹ûÓ¦ÓÃÒ»´ÎÐèÒª×öһϵÁÐSQL²Ù×÷£¬ÔòÐèÒªÍù·µÓÚPHPÓëORACLE£¬²»Èç°Ñ¸ÃÓ¦ÓÃÖ±½Ó·Åµ½Êý¾Ý¿â·½ÒÔ¼õÉÙÍù·µ´ÎÊý£¬Ôö¼ÓЧÂÊ¡£
µ«ÊÇÔÚINTERNETÓ¦ÓÃÉÏ£¬ËÙ¶ÈÊǼ«¶ÈÖØÒªµÄ£¬ËùÒÔºÜÓбØҪʹÓô洢¹ý³Ì¡£
żҲÊÇʹÓÃPHPµ÷Óô洢¹ý³Ì²»¾Ã£¬×öÁËÏÂÃæÕâ¸öÁÐ×Ó¡£
SQL´úÂë:-----------------------------------------
//½¨Á¢Ò»¸öTEST±í
CREATE TABLE TEST (
ID NUMBER(16) NOT NULL,
NAME VARCHAR2(30) NOT NULL,
PRIMARY KEY (ID)
);
//²åÈëÒ»ÌõÊý¾Ý
INSERT INTO TEST VALUES (5, 'PHP_BOOK');
//½¨Á¢Ò»¸ö´æ´¢¹ý³Ì
CREATE OR REPLACE PROCEDURE PROC_TEST (p_id IN OUT NUMBER,p_name OUT VARCHAR2) AS
BEGIN
SELECT NAME INTO p_name from TEST WHERE ID = 5;
END PROC_TEST;
/
PHP´úÂë:-----------------------------------------
<?php
//½¨Á¢Êý¾Ý¿âÁ¬½Ó
$user = "scott"; //Êý¾Ý¿âÓû§Ãû
$password = "tiger"; //ÃÜÂë
$conn_str = "tnsname"; //Á¬½Ó´®(cstr : Connection_STRing)
$remote = true //ÊÇ·ñÔ¶³ÌÁ¬½Ó
if ($remote) {
$conn = OCILogon($user, $password, $conn_str);
}
else {
$conn = OCILogon($user, $password);
}
//É趨°ó¶¨
$id = 5; //×¼±¸ÓÃÒ԰󶨵Äphp±äÁ¿ id
$name = ""; &
Ïà¹ØÎĵµ£º
1. ¾¡Á¿²ÉÓôóÁ¿µÄPHPÄÚÖú¯Êý¡£
2. echo ±È print ¿ì¡£
3. ²»Òª°Ñ·½·¨Ï¸·ÖµÃ¹ý¶à£¬×ÐϸÏëÏëÄãÕæÕý´òËãÖØÓõÄÊÇÄÄЩ´úÂ룿
4. ÔÚÖ´ÐÐforÑ»·Ö®Ç°È·¶¨×î´óÑ»·Êý£¬²»ÒªÃ¿Ñ»·Ò»´Î¶¼¼ÆËã×î´óÖµ¡£
5. ×¢ÏúÄÇЩ²»ÓõıäÁ¿ÓÈÆäÊÇ´óÊý×飬ÒÔ±ãÊÍ·ÅÄÚ´æ¡£
6. ²¢·ÇÒªÓÃÀàʵÏÖËùÓеÄÊý¾Ý½á¹¹£¬Êý×éÒ²ºÜÓÐÓá£
7. $row['id']µÄÐ ......
»ù´¡Ìâ
¡¡¡¡1.±íµ¥ÖÐ getÓëpostÌá½»·½·¨µÄÇø±ð?
¡¡¡¡´ð£ºgetÓû§¶Ë½«Êý¾Ý¼Óµ½URLºó£¬¸ñʽΪ”?×Ö¶Î1=ÊäÈëÊý¾Ý1&×Ö¶Î2=ÊäÈëÊý¾Ý2&..."¡£
¡¡¡¡ÓÉÓÚgetÌá½»²ÎÊýºó»áÔÚµØÖ·À¸ÖÐÏÔʾ³öÀ´£¬ËùÒÔ»á²úÉúÑÏÖصݲȫÎÊÌâ¡£
¡¡¡¡get´«ÊäµÄÊý¾ÝÁ¿Ð¡£¬get´«ÊäµÄÊý¾ÝÁ¿Ð¡£¬ÕâÖ÷ÒªÊÇÒòΪÊÜurl³¤¶ÈÏÞÖÆ;¶øpost¿ÉÒÔ´«Ê ......
(IT°ØÀͼ Ô´´ÎÄÕÂ)Èç¹ûÖ»ÊÇunicodeתutf-8±àÂëµÄËã·¨£¬ÍøÉϵ½´¦¶¼ÊÇÁË£¬²»¹ýºÜ¶àÈËÒ²ÊÇÄã³ÎÒ£¬ÎÒ³Ä㣬¸ù±¾¾Í²»Àí½âwhyºÍdo£¬±¾ÎijýÁ˸ø³ö×î¼òµ¥µÄphp¶Ôunicodeתutf-8±àÂ뺯ÊýÖ®Í⣬ҲÉîÈëÌÖÂÛÁËÕâÁ½ÖÖ±àÂëµÄ¹Øϵ£¬Àí½âºÃÁ˻ᷢÏÖÍøÉÏһЩ¾ÉµÄ¶«Î÷£¬ÊÇÑÏÖضàÓà¼æ¹ýÆڵģ¬ÒòΪ´Óutf-8Á÷ÐпªÊ¼µ½ÏÖÔÚ£¬ÔçÒѾÓÉÔÀ´Áù×Ö½Ú ......
¡öPDOΪºÎÎ
POD£¨PHP Data Object£©À©Õ¹ÔÚPHP5ÖмÓÈ룬PHP6Öн«Ä¬ÈÏʶÓÃPDOÁ¬½ÓÊý¾Ý¿â£¬ËùÓзÇPDOÀ©Õ¹½«»áÔÚPHP6±»´ÓÀ©Õ¹ÖÐÒƳý¡£¸ÃÀ©Õ¹ÌṩPHPÄÚÖÃÀà PDOÀ´¶ÔÊý¾Ý¿â½øÐзÃÎÊ£¬²»Í¬Êý¾Ý¿âʹÓÃÏàͬµÄ·½·¨Ãû£¬½â¾öÊý¾Ý¿âÁ¬½Ó²»Í³Ò»µÄÎÊÌâ¡£
ÎÒÊÇÅäÖÃÔÚwindowsÏÂ×ö¿ª·¢Óõġ£
¡öPDOµÄÄ¿±ê
ÌṩһÖÖÇáÐÍ¡¢ÇåÎú¡¢·½±ãµÄ A ......
<?php
class ClientGetObj{
function getOS(){
global $_SERVER;
$agent=$_SERVER["HTTP_USER_AGENT"];
$os=false;
if(eregi("win",$agent)&&strpos($agent,"95")){
$os="Windows 95";
}else if(eregi("win 9x",$agent)&&strpos($agent,"4.90")){
$os="Windows ME";
}else ......