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[
相关文档:
ROM和RAM指的都是半导体存储器,ROM是Read Only Memory的缩写,RAM是Random Access Memory的缩写。ROM在系统停止供电的时候仍然可以保持数据,而RAM通常都是在掉电之后就丢失数据,典型的RAM就是计算机的内存。
RA
ROM和RAM指的� ......
我们把下载的三个软件包放到/var/local目录下(这是笔者个人的习惯),它们都是tar.gz包,可以用命令tar -xzpvf 包名,把它们在当前目录(/var/local/)中解开:
cd /var/local
tar -xzpvf mysql-4.0.15.tar.gz
tar -xzpvf php-4.3.3.tar.gz
tar -xzpvf httpd-2.0.47.tar.gz
解包后可以开始进入正式安装。 ......
原帖地址: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 ......