错误信息提示:
错误号:12142

错误原因:

错误SQL语句:
select * from user_skin where  find_in_set('sysai.net',replace(host,'|',','))

Warning: fopen(/error/2025-06-26.txt): failed to open stream: No such file or directory in /opt/lampp/htdocs/sysai/inc/datai.php on line 247
文件 2025-06-26.txt 不可写

sysai
『 자료실 』
현재위치 : HOME > 자료실
flex 实现p2p文件传输
글쓴이 : 매니저 작성일 : 2010-04-29
 

http://www.adobe.com/2006/mxml" layout="absolute" addedToStage="init()">

//Importing the necessary classes 导入需要的类
   import mx.events.ItemClickEvent;
   import mx.events.ListEvent;
   import mx.automation.events.ListItemSelectEvent;
   import mx.collections.ArrayCollection;

   // Creating constants for the stratus serveraddress and your developer key
   //
   private const SERVER_ADDRESS:String = "rtmfp://stratus.adobe.com/";
   private const DEVELOPER_KEY:String = "################################";

   //Creating variable for handling the incomming and outgoing data
   private var netConnection:NetConnection;
   private var sendStream:NetStream;
   private var recievedStream:NetStream;

   // Create a variabele for handling the files
   private var file:FileReference;

   // A Dataprovider for the listitem (to display downloads)
   private var dp:ArrayCollection = new ArrayCollection

   private function init():void
   {
    // Creating a new connection to the Stratus server
    netConnection = new NetConnection();
  
    netConnection.addEventListener(NetStatusEvent.NET_STATUS, netConnectionHandler);
    netConnection.connect(SERVER_ADDRESS+DEVELOPER_KEY);
   }

   public function netConnectionHandler(e:NetStatusEvent):void
   {
    // If there was a connection was made with the Stratusserver
    if(e.info.code == "NetConnection.Connect.Success")
    {
     // Adding your id to the NearID textfield
     txtNearID.text = netConnection.nearID;
     // Creating a new netstream that handles the outgoing data
     sendStream = new NetStream(netConnection, NetStream.DIRECT_CONNECTIONS);
     sendStream.addEventListener(NetStatusEvent.NET_STATUS, netStreamHandler);
     // Giving the stream a idName
     sendStream.publish("file");
     }
   }

   public function netStreamHandler(e:NetStatusEvent):void
   {
    trace(e.info.code);
   }

   private function receive(e:Event):void
   {
    // This functions handles the incomming data
    // Connection between you and the target
    recievedStream = new NetStream(netConnection,txtFarID.text);
    recievedStream.client = this;
    recievedStream.addEventListener(NetStatusEvent.NET_STATUS, incomingStreamHandler);
   // Using the "file" stream identification
    recievedStream.play("file");
   }

   public function incomingStreamHandler(e:NetStatusEvent):void
   {
    // If there was a connection between you and the target
    if(e.info.code == "NetStream.Play.Start")
    {
     // set the textBackgroundcolor to green
     txtFarID.setStyle("backgroundColor", "#00ff00");
    // show the fileBrowse/Send view
     fileField.visible = true;
    }
   }

   private function browseHandler():void
   {
    // Creating a new FileReference to start choosing your file
    file = new FileReference;
    // Adding eventListeners
    file.addEventListener(Event.SELECT, selectHandler);
    file.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
    file.addEventListener(ProgressEvent.PROGRESS, progressHandler);
    file.addEventListener(Event.COMPLETE, completeHandler);
    // Open the browse-file dialogue
    file.browse();
   }

   private function selectHandler(event:Event):void
   {
    // If you selected a file to send
    file = FileReference(event.target);
    // load the file
    file.load();
    // Set the source textfield to the filename
    txtFile.text = file.name;
   }
   private function completeHandler(event:Event):void
   {
    // The file was loaded succesfully
    trace("completeHandler: " + event);
    // The send button will be enabled
    btnSend.enabled= true;
   }

    private function ioErrorHandler(event:IOErrorEvent):void
   {
    trace("ioErrorHandler: " + event);
   }

   private function progressHandler(event:ProgressEvent):void
   {
    // Process loading the file
    var file:FileReference = FileReference(event.target);
    trace("progressHandler: name=" + file.name + " bytesLoaded=" + event.bytesLoaded + " bytesTotal=" + event.bytesTotal);
   }

   public function onFileSend(e:Event):void
   {
    // Creating an object
    var fileData:Object = new Object();
   // Giving the object a property that container the file data as a ByteArray
    fileData.file = file.data
   // Property of the name of the file
    fileData.name = file.name;
   // Sending the file to the target and it will be received
   // by the 'onFileReceived' function
    sendStream.send("onFileReceived",fileData);
   }

   public function onFileReceived(info:Object):void
   {
   // This functions handles the incomming data
   // We add the object to a dataprovider
   // For displayin the files in a list
// Giving the name and file data as properties
   dp.addItem({label:info.name, file:info.file});
// If an item of the list was clicked
   fileList.addEventListener(ListEvent.ITEM_CLICK, itemDownloadHandler);
// Setting the dataprovider of the listcomponent
   fileList.dataProvider = dp;
   }
   private function itemDownloadHandler(event:ListEvent):void
   {
    // creating new FileReference
    file= new FileReference();
   // saving the clicked item to your computer
   // brings out a savedialogue
    file.save(event.itemRenderer.data.file, event.itemRenderer.data.label);
   }
]]>







  
  
  
  




목록


홈으로 | 이용안내 | 이용약관 | 개인정보보호정책 | 제휴문의 | 질문과답변 | 자주하는 질문
Copyright © 2011 - 2014 SYSAI Work Group, All Rights Reserved 주소:길림성연길시,우편:133300 Version 3.0 Run Time 0.226s