flash + php ÎļþÉÏ´«
import flash.net.FileFilter;
import flash.net.FileReferenceList;
import fl.controls.Button;
import flash.events.MouseEvent;
import flash.events.Event;
import flash.events.ProgressEvent;
import flash.events.HTTPStatusEvent;
import flash.display.Loader;
import flash.net.URLRequest;
var choose_button:Button=new Button();
var upload_button:Button=new Button();
var loader:Loader=new Loader();
var reference_list:FileReferenceList=new FileReferenceList();
var url:URLRequest=new URLRequest("http://localhost/flashupload.php");
choose_button.label="Ñ¡ÔñÎļþ";
upload_button.label="ÉÏ´«Îļþ";
upload_button.move(100,50);
addChild(choose_button);
choose_button.move(300,100);
addChild(upload_button);
addChild(loader);
choose_button.addEventListener(MouseEvent.CLICK,choose_file);
upload_button.addEventListener(MouseEvent.CLICK,upload_start);
reference_list.addEventListener(Event.SELECT, selectHandle);
reference_list.addEventListener(Event.CANCEL, cancelHandle);
//reference_list.addEventListener(ProgressEvent.PROGRESS, progressHandler);
//reference_list.addEventListener(Event.COMPLETE, completeHandle);
//reference_list.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandle);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,load_complete);
function progressHandler(evt:ProgressEvent):void{
trace("ProgressEvent");
trace(evt.target.name+"="+evt.bytesLoaded)
}
function load_complete(evt:Event):void{
trace("load_complete");
}
function selectHandle(evt:Event):void{
trace("select file successfully");
trace("ÄãÑ¡ÔñÁË"+evt.target.fileList.length+"Îļþ")
for(var i:int=0;i<evt.target.fileList.length;i++){
trace(evt.target.fileList[i].name);
evt.target.fileList[i].addEventListener(ProgressEvent.PROGRESS, progressHandler);
evt.target.fileList[i].addEventListener(Event.COMPLETE, completeHandle);
evt.target.fileList[i].load();
}
//trace("type"+evt.target.fileList[
Ïà¹ØÎĵµ£º
ÕâÁ½ÌìÔÚµ·¹ÄPHP£¬È¥ecshopºÍphpwindÏÂÔØÁËÒ»¸öÉ̳ǺÍÒ»¸öÂÛ̳¡£Á½¸ö¶¼ÐèÒª°²×°mysqlµÄ·þÎñÆ÷£¬ÓÚÊÇÎÒ°´Õս̳̽øÐа²×°¡£½á¹û·¢ÏÖÿ´Î¶¼Êǵ½Á¬½ÓÊý¾Ý¿âµÄµØ·½¾Í±ä³É¿Õ°×Ò³ÁË¡£ËÀ»îÕÒ²»³öÀ´ÎÊÌâ¡£ºóÀ´ÔÚÓཨµÄÖ¸µ¼Ï£¬·¢ÏÖÔÀ´ÊÇPHPµÄ°æ±¾¹ý¸ß¡£ÕæÊÇÓôÃÆ¡£
ÏÖÔÚÎÒ°ÑÎÒ×î½üÅäÖõĹý³Ìд³öÀ´¡£
ËùÐèÈí¼þ£º
apache_2.2.14-wi ......
¼òÊöÌâ(50·Ö)()
1¡¢ÓÃPHP´òÓ¡³öǰһÌìµÄʱ¼ä¸ñʽÊÇ2006-5-10 22:21:21(2·Ö)
echo date('Y-m-d H:i:s', strtotime('-1 day'));
»òÕß
$yesterday = time() - (24 * 60 * 60);
echo 'today:'.date('Y-m-d H:i:s')."\n";
echo 'yesterday:'. date('Y-m-d H:i:s', $yesterday)."\n";
2¡¢echo(),print(),print_r()µÄÇø±ð( ......
PHPÖеÄMYSQL³£Óú¯Êý×ܽá
1¡¢mysql_connect()-½¨Á¢Êý¾Ý¿âÁ¬½Ó
¸ñʽ£º
resource mysql_connect([string hostname [:port] [:/path/to/socket] [, string username] [, string password]])
Àý£º
$conn = @mysql_connect("localhost", "username", "password") or dir( ......
¸Õ¿ªÊ¼ÓÃCS4µÄʱºò¾Í×¢Òâµ½ÁËÕâ¸öÕâ¸ö¹¦Äܲ»¹ý¶¼Ã»Êµ¼ù¹ý,Õ⼸Ììʵ¼ùÁËһϷ¢ÏÖÊǸöºÜºÃºÜºÍгµÄµÄ¼¼ÄÜ .ÓÐÁËËüÎÒÃǾͿÉÒÔºÜɵ¹ÏµÄ±à¼Ò»Ð©ÎÒÃdzÌÐòÔ±ºÜÍ·Ì۵ĴúÂë,±ÈÈçflash¶¯»µÄÂ˾µÐ§¹û,Èç¹ûûÓÐÕâ¸ö¹¦ÄܹÀ¼Æ°ïÖúÎĵµÀïÃæµÄflash.filters°üµÃ¿´°ëÌì…ÓиöÕâ¸ö¹¦ÄÜÎÒÃǾͲ»ÓóîÁË.±ÈÈçÏÖÔÚÎÒÏ붯̬Ìí¼ÓÌí¼ÓÒ»¸öÔª¼ ......
ÔÌûµØÖ·£ºhttp://www.phpma.com/english/20071215/640.html
Description
array explode
( string separator, string string [, int limit])phpma.com
Returns an array of strings, each of which is a substring of string
formed by splitting it on boundaries formed by the string separator
. If limit
is ......