电脑技术,网站建设
http://hirokimo.com/?p=49
as2时代要实现该功能只有在本地draw完bitmap后,把所有widthxheight的图片都储存到数组里然后post给php,php通过gd库来生成,虽然可以不过效率就…一张120×90的图就够flash运算半天了.
as3要实现这个功能虽然还要借助php,但是只是借助php把图片数据给echo出来而已.图片生成关键步骤都在客户端进行了.
另外还需要adobe官方的as3corelib包.
客户端:
import com.adobe.images.JPGEncoder;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.net.URLRequestHeader;
import flash.net.navigateToURL;
import flash.utils.ByteArray;
//画位图数据
var jpgSource:BitmapData = new BitmapData (picture.width, picture.height);
jpgSource.draw(picture);
//生成编码容器
var jpgEncoder:JPGEncoder = new JPGEncoder(95);
//将位图数据编码到容器内成为ByteArray流
var jpgStream:ByteArray = jpgEncoder.encode(jpgSource);
//压缩ByteArray流
jpgStream.compress();
//添加stream的header请求
var header:URLRequestHeader = new URLRequestHeader("Content-type", "application/octet-stream");
var jpgURLRequest:URLRequest = new URLRequest("save.php");
jpgURLRequest.requestHeaders.push(header);
jpgURLRequest.method = "POST";
jpgURLRequest.data = jpgStream;
//推送图片数据到服务器端
navigateToURL(jpgURLRequest, "_blank");
服务器端:
<?php
$jpg = gzuncompress($GLOBALS["HTTP_RAW_POST_DATA"]);
header("Content-Type: image/jpeg");
echo $jpg;
?>
as2时代要实现该功能只有在本地draw完bitmap后,把所有widthxheight的图片都储存到数组里然后post给php,php通过gd库来生成,虽然可以不过效率就…一张120×90的图就够flash运算半天了.
as3要实现这个功能虽然还要借助php,但是只是借助php把图片数据给echo出来而已.图片生成关键步骤都在客户端进行了.
另外还需要adobe官方的as3corelib包.
客户端:
import com.adobe.images.JPGEncoder;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.net.URLRequestHeader;
import flash.net.navigateToURL;
import flash.utils.ByteArray;
//画位图数据
var jpgSource:BitmapData = new BitmapData (picture.width, picture.height);
jpgSource.draw(picture);
//生成编码容器
var jpgEncoder:JPGEncoder = new JPGEncoder(95);
//将位图数据编码到容器内成为ByteArray流
var jpgStream:ByteArray = jpgEncoder.encode(jpgSource);
//压缩ByteArray流
jpgStream.compress();
//添加stream的header请求
var header:URLRequestHeader = new URLRequestHeader("Content-type", "application/octet-stream");
var jpgURLRequest:URLRequest = new URLRequest("save.php");
jpgURLRequest.requestHeaders.push(header);
jpgURLRequest.method = "POST";
jpgURLRequest.data = jpgStream;
//推送图片数据到服务器端
navigateToURL(jpgURLRequest, "_blank");
服务器端:
<?php
$jpg = gzuncompress($GLOBALS["HTTP_RAW_POST_DATA"]);
header("Content-Type: image/jpeg");
echo $jpg;
?>
window和linux的常用网络软件对比
[
2009/05/24 10:51 | by luokan ]
2009/05/24 10:51 | by luokan ]
转自:http://andey.blog.hexun.co...
浏览器
Windows:
Internet Explorer, Netscape / Mozilla, Opera [Prop], Firebird
Linux:
1) Netscape / Mozilla.
2) Galeon.
3) Konqueror.
4) Opera. [Prop]
5) Firebird.
6) Nautilus.
7) Epiphany.
8) Links. (with "-g" key).
9) Dillo. (俄语补丁:http://stuphead.asplinux.ru/dillo/).
10) Encompass.
浏览器
Windows:
Internet Explorer, Netscape / Mozilla, Opera [Prop], Firebird
Linux:
1) Netscape / Mozilla.
2) Galeon.
3) Konqueror.
4) Opera. [Prop]
5) Firebird.
6) Nautilus.
7) Epiphany.
8) Links. (with "-g" key).
9) Dillo. (俄语补丁:http://stuphead.asplinux.ru/dillo/).
10) Encompass.
用php写shell脚本
[
2009/05/22 01:00 | by luokan ]
2009/05/22 01:00 | by luokan ]
把php当shell用可以这样,加头部加php路径
如
#! /usr/local/php5/bin/php -q
<?
include('smtp.class.php');
echo("ok");
?>
#! /usr/local/php5/bin/php
如
#! /usr/local/php5/bin/php -q
<?
include('smtp.class.php');
echo("ok");
?>
linux下命令行FTP客户端NcFTP安装使用
[
2009/05/21 10:35 | by luokan ]
2009/05/21 10:35 | by luokan ]
上官网
http://www.ncftp.com/download/
下载 NcFTP Client
找个最新版源码
ftp://ftp.ncftp.com/ncftp/ncftp-3.2.2-src.tar.gz
我用wget下载
解压
配置(默认)
make
make install
http://www.ncftp.com/download/
下载 NcFTP Client
找个最新版源码
ftp://ftp.ncftp.com/ncftp/ncftp-3.2.2-src.tar.gz
我用wget下载
wget ftp://ftp.ncftp.com/ncftp/ncftp-3.2.2-src.tar.gz
解压
tar -zxvf ncftp-3.2.2-src.tar.gz
配置(默认)
./configure --prefix=安装路径
make
make install
解决数据库 Table ‘xxx’ is marked as crashed and should be repaired 错误的参考
[
2009/05/21 09:59 | by luokan ]
2009/05/21 09:59 | by luokan ]
解决数据库 Table ‘xxx’ is marked as crashed and should be repaired 错误的参考
1. 进入管理mysql的phpmyadmin
2. 在左则选中自己的数据库
3. 在右则勾选中错误信息中的那个’xxx’表
4. 滚动屏幕到下面,有个下拉菜单(With selected:),选择”Repair table”
1. 进入管理mysql的phpmyadmin
2. 在左则选中自己的数据库
3. 在右则勾选中错误信息中的那个’xxx’表
4. 滚动屏幕到下面,有个下拉菜单(With selected:),选择”Repair table”





