HTTPServiceÓëPHPͨÐÅ
ÔÚFlexÖÐÓÐ2¸öHTTPServiceÀ࣬ËüÃǵÄÍêÕû¼Ì³Ð·¾¶·Ö±ðÊÇmx.rpc.httpºÍmx.rpc.http.mxml,¿ÉÒÔ¿´³ömx.rpc.http.mxmlÊÇmx.rpc.httpµÄ×ÓÀà¡£mx.rpc.http.mxmlÖеÄhttpServiceÖ÷ÒªÊÇΪÁËMXML±êÇ©ÖÐʹÓÃHTTPService¶øÉèµÄ¡£mx.rpc.httpÊÇÔÚʹÓÃas½Å±¾½øÐвÙ×÷ʱʹÓᣵ±µ÷Óà HTTPService ¶ÔÏóµÄ send() ·½·¨Ê±£¬½«·¢³ö¶ÔÖ¸¶¨ URL µÄ HTTP ÇëÇ󣬲¢ÇÒ·µ»Ø HTTP ÏìÓ¦¡£¿ÉÒÔÑ¡ÔñÏòÖ¸¶¨ URL ´«µÝ²ÎÊý¡£Èç¹ûûÓÐʹÓûùÓÚ·þÎñÆ÷µÄ´úÀí·þÎñ£¬ÔòÖ»ÄÜʹÓà HTTP GET »ò POST ·½·¨¡£
send
()
·½·¨
public function send(parameters:Object = null):AsyncToken
Ö´ÐÐ HTTPService ÇëÇó¡£²ÎÊýÊÇ¿ÉÑ¡µÄ£»µ«Èç¹ûÖ¸¶¨²ÎÊý£¬ËùÖ¸¶¨µÄÖµÓ¦¸ÃÊÇ°üº¬Ãû³Æ/Öµ¶ÔµÄ Object »ò XML ¶ÔÏó£¨È¡¾öÓÚ contentType£©¡£
²ÎÊý
parameters:Object (default = null)
·µ»Ø
AsyncToken — ±íʾÒì²½Íê³É±ê¼ÇµÄ¶ÔÏ󡣸öÔÏóÓë result »ò fault ʼþµÄ token ÊôÐÔÖеĶÔÏóÏàͬ¡£
setCredentials
()
·½·¨
ÏÂÃæÊÇÒ»¸öʹÓÃHTTPServiceÓëPHPͨÐŵÄÀý×Ó£¬PHP·µ»ØÒ»¸öXMLÎı¾´®£¬FLex½«Õâ¸öXML´®ÏÔʾÔÚDataGRid¿Ø¼þÖС£
Flex´úÂ루ע£ºÏÂÃæµÄ´úÂëдÔÚÒ»¸öFlexÄ£¿éÖУ©£º
<?xml version="1.0" encoding="utf-8"?>
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="438" height="324" fontSize="12" creationComplete="CreationComplete()">
<mx:Script>
<!--[CDATA[
import mx.rpc.http.HTTPService;
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
[Bindable]
private var xml:XML;
private var http:HTTPService;
public function onclose():void{
this.parent.parent.parent.removeChild(this.parent.parent);
}
public function CreationComplete():void{
this.GetItem();
}
private function GetItem():void{
http = new HTTPService();
http.url="http://localhost/PHPAsset/getunit.php";
http.method="POST";
http.resultFormat="e4x";
http.useProxy=false;
http.addEventListener(ResultEvent.RESULT,onResult);
http.addEventListener(FaultEvent.FAULT,onFault);
http.send();
}
private function onFault(
Ïà¹ØÎĵµ£º
OpenX adserver version 2.8.1 and lower is vulnerable to remote code
execution. To be exploited, this vulnerability requires banner / file
upload permissions, such as granted to the 'advertiser' and
'administrator' roles.
This vulnerability is caused by the (insecure) file upload mechanism of
af ......
1,Smarty»º´æµÄÅäÖãº
$smarty->cache-dir="Ŀ¼Ãû"; //´´½¨»º´æĿ¼Ãû
$smarty->caching=true; //¿ªÆô»º´æ£¬ÎªfalseµÄʱºò»º´æÎÞЧ
$smarty->cache_lifetime=60; //»º´æʱ¼ä£¬µ¥Î»ÊÇÃë
2,Smarty»º´æµÄʹÓÃÓëÇå³ý
$marty->d ......
PHPµÄÈÕÆÚʱ¼äº¯Êýdate()
1£¬Äê-ÔÂ-ÈÕ
echo date('Y-m-j');
2007-02-6
echo date('y-n-j');
07-2-6
´óдY±íʾÄêËÄλÊý×Ö£¬¶øСдy±íʾÄêµÄÁ½Î»Êý×Ö£»
Сдm±íʾÔ·ݵÄÊý×Ö(´øÇ°µ¼)£¬¶øСдnÔò±íʾ²»´øÇ°µ¼µÄÔ·ÝÊý×Ö¡£
echo date('Y-M-j');
2007-Feb-6
echo date('Y-m-d');
2007-02-06
´óдM±íʾÔ·ݵÄ3¸öËõÐ´× ......
1¡¢HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\MySQL
Ŀ¼ɾ³ý
2¡¢HKEY_LOCAL_MACHINE\SYSTEM\ControlSet003\Services\Eventlog\Application\MySQL
Ŀ¼ɾ³ý
3¡¢HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MySQL
Ŀ¼ɾ³ý ......