PHPͨ¹ýDOM²Ù×÷XML
PHP XML²Ù×÷ÀàDOMDocumentÊôÐÔ¼°·½·¨
×¢Òâ´óСдһ¶¨²»ÄÜŪ´í.
ÊôÐÔ:
Attributes ´æ´¢½ÚµãµÄÊôÐÔÁбí(Ö»¶Á)
childNodes ´æ´¢½ÚµãµÄ×Ó½ÚµãÁбí(Ö»¶Á)
dataType ·µ»Ø´Ë½ÚµãµÄÊý¾ÝÀàÐÍ
Definition ÒÔDTD»òXMLģʽ¸ø³öµÄ½ÚµãµÄ¶¨Òå(Ö»¶Á)
Doctype Ö¸¶¨ÎĵµÀàÐͽڵã(Ö»¶Á)
documentElement ·µ»ØÎĵµµÄ¸ùÔªËØ(¿É¶Áд)
firstChild ·µ»Øµ±Ç°½ÚµãµÄµÚÒ»¸ö×Ó½Úµã(Ö»¶Á)
Implementation ·µ»ØXMLDOMImplementation¶ÔÏó
lastChild ·µ»Øµ±Ç°½Úµã×îºóÒ»¸ö×Ó½Úµã(Ö»¶Á)
nextSibling ·µ»Øµ±Ç°½ÚµãµÄÏÂÒ»¸öÐֵܽڵã(Ö»¶Á)
nodeName ·µ»Ø½ÚµãµÄÃû×Ö(Ö»¶Á)
nodeType ·µ»Ø½ÚµãµÄÀàÐÍ(Ö»¶Á)
nodeTypedValue ´æ´¢½ÚµãÖµ(¿É¶Áд)
nodeValue ·µ»Ø½ÚµãµÄÎı¾(¿É¶Áд)
ownerDocument ·µ»Ø°üº¬´Ë½ÚµãµÄ¸ùÎĵµ(Ö»¶Á)
parentNode ·µ»Ø¸¸½Úµã(Ö»¶Á)
Parsed ·µ»Ø´Ë½Úµã¼°Æä×Ó½ÚµãÊÇ·ñÒѾ±»½âÎö(Ö»¶Á)
Prefix ·µ»ØÃû³Æ¿Õ¼äǰ׺(Ö»¶Á)
preserveWhiteSpace Ö¸¶¨ÊÇ·ñ±£Áô¿Õ°×(¿É¶Áд)
previousSibling ·µ»Ø´Ë½ÚµãµÄÇ°Ò»¸öÐֵܽڵã(Ö»¶Á)
Text ·µ»Ø´Ë½Úµã¼°Æäºó´úµÄÎı¾ÄÚÈÝ(¿É¶Áд)
url ·µ»Ø×î½üÔØÈëµÄXMLÎĵµµÄURL(Ö»¶Á)
Xml ·µ»Ø½Úµã¼°Æäºó´úµÄXML±íʾ(Ö»¶Á)
·½·¨:
appendChild Ϊµ±Ç°½ÚµãÌí¼ÓÒ»¸öеÄ×Ó½Úµã,·ÅÔÚ×îºóµÄ×Ó½Úµãºó
cloneNode ·µ»Øµ±Ç°½ÚµãµÄ¿½±´
createAttribute ´´½¨ÐµÄÊôÐÔ
createCDATASection ´´½¨°üÀ¨¸ø¶¨Êý¾ÝµÄCDATA¶Î
createComment ´´½¨Ò»¸ö×¢Êͽڵã
createDocumentFragment ´´½¨DocumentFragment¶ÔÏó
createElement ´´½¨Ò»¸öÔªËؽڵã
createEntityReference ´´½¨EntityReference¶ÔÏó
createNode ´´½¨¸ø¶¨ÀàÐÍ,Ãû×ÖºÍÃüÃû¿Õ¼äµÄ½Úµã
createPorcessingInstruction ´´½¨²Ù×÷Ö¸Áî½Úµã
createTextNode ´´½¨°üÀ¨¸ø¶¨Êý¾ÝµÄÎı¾½Úµã
getElementsByTagName ·µ»ØÖ¸¶¨Ãû×ÖµÄÔªËؼ¯ºÏ
hasChildNodes ·µ»Øµ±Ç°½ÚµãÊÇ·ñÓÐ×Ó½Úµã
insertBefore ÔÚÖ¸¶¨½ÚµãÇ°²åÈë×Ó½Úµã
Load µ¼ÈëÖ¸¶¨Î»ÖõÄXMLÎĵµ
loadXML µ¼ÈëÖ¸¶¨×Ö·û´®µÄXMLÎĵµ
removeChild ´Ó×Ó½áµãÁбíÖÐɾ³ýÖ¸¶¨µÄ×Ó½Úµã
replaceChild ´Ó×Ó½ÚµãÁбíÖÐÌæ»»Ö¸¶¨µÄ×Ó½Úµã
Save °ÑXMLÎļþ´æµ½Ö¸¶¨½Úµã
selectNodes ¶Ô½Úµã½øÐÐÖ¸¶¨µÄÆ¥Åä,²¢·µ»ØÆ¥Åä½ÚµãÁбí
selectSingleNode ¶Ô½Úµã½øÐÐÖ¸¶¨µÄÆ¥Åä,²¢·µ»ØµÚÒ»¸öÆ¥Åä½Úµã
transformNode ʹÓÃÖ¸¶¨µÄÑùʽ±í¶Ô½Úµã¼°Æäºó´ú½øÐÐת»»
transformNodeToObject ʹÓÃÖ¸¶¨µÄÑùʽ±í½«½Úµã¼°Æäºó´úת»»
PHP ´úÂ븴ÖƵ½¼ôÌ
Ïà¹ØÎĵµ£º
<?
$fp = fsockopen ("passport.baidu.com", 80,
$errno, $errstr, 30);
if (!$fp) {
echo "$errstr
($errno)<br>\n";
} else {
$msg="GET
/?login&username=lapiaotuan22&password=oyhz123456
HTTP/1.0\r\n";
$msg.="Host:passport.baidu.com \r\n&quo ......
1 ÔÚSQLÓï¾äÖпÉͨ¹ýÌí¼ÓÏÞÖÆÌõ¼þ:left(text,20)ֻȡtextÎı¾µÄÇ°20¸ö×Ö;
¡¡¡¡2 ¿ÉÒÔÓÃlimit fromRecord, RecordNum À´×÷Ϊ·ÖҳʹÓÃ,±ÈÈçlimit 0,30±íʾ´ÓµÚÒ»¸ö¼Ç¼¿ªÊ¼±éÀú30¸ö¼Í¼;
¡¡¡¡3 Á½¸ö±íµÄÁ¬½Ó¿ÉÒÔÊÇ£ºtable1 join table2 using x(xΪÁ½¸ö±íµÄ¹«¹²×Ö¶Î),»òÕßÊÇtable1 join table2 on table1.x = table2.x
¡¡¡ ......
<?php
/* ----------------------------------------------------------------------------
* Script Name: encrypt.php
* Creation Date: 2008-4-7 10:36
* Last Modified: 2008-4-12 16:00
* Author: meyu
* Copyright (c) 2007
* Purpose: Êý×Ö×Ö·û´®¼òÒ×¼Ó½âÃÜ
* --------------------------------- ......
PHPÊǸöΰ´óµÄweb¿ª·¢ÓïÑÔ£¬Áé»îµÄÓïÑÔ£¬µ«ÊÇ¿´µ½php³ÌÐòÔ±Öܶø¸´Ê¼µÄ·¸µÄһЩ´íÎó¡£ÎÒ×öÁËÏÂÃæÕâ¸öÁÐ±í£¬ÁгöÁËPHP³ÌÐòÔ±¾³£·¸µÄ10ÖдíÎ󣬴ó¶àÊýºÍ°²È«Ïà¹Ø¡£¿´¿´Äã·¸Á˼¸ÖÖ£º
1.²»×ªÒâhtml entities
Ò»¸ö»ù±¾µÄ³£Ê¶£ºËùÓв»¿ÉÐÅÈεÄÊäÈ루ÌرðÊÇÓû§´ÓformÖÐÌá½»µÄÊý¾Ý£© £¬Êä³ö֮ǰ¶¼Òª×ªÒâ¡£
echo $_GET['usenam ......