Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JAVAºÍPHPÎļþ²Ù×÷×ܽá

JAVAÎļþ²Ù×÷×ܽá
FileÀà
File f = new File(path);
pathΪʵ¼Ê·¾¶£¬¸Ã·¾¶¿ÉÒÔÊÇÎļþ£¬»òÎļþ¼Ð£¬Ò²¿ÉÒÔÊDz»´æÔڵġ£
f.exists() ¿ÉÒÔÅжϸ÷ÊÇ·ñ´æÔÚ¡£
f.isDirectory() ¿ÉÒÔÅжÏÊÇ·ñÊÇÎļþ¼Ð¡£
f.mkdirs(); µÝ¹é´´½¨Îļþ¼Ð
FileºÍÊäÈëÊä³öÁ÷Ö®¼äŦ´øFileInutStream£¬FileOutputStream
URL url = new URL(strUrl);
BufferedInputStream bis = new BufferedInputStream(url.openStream()); //ÓÃbuffer   
OutputStream os = new FileOutputStream(new File(path + newName));
byte[] bytes = new byte[1024];
int len;
while((len = bis.read(bytes)) > 0) { //Ñ­»·¶ÁÈ¡1024×Ö½Ú
     os.write(bytes, 0, len);  //дÈë1024×Ö½Ú
}
bis.close();
os.flush();
os.close();


Ïà¹ØÎĵµ£º

Java¶ÔÏóµÄÐòÁл¯ºÍ·´ÐòÁл¯

µ±Á½¸ö½ø³ÌÔÚ½øÐÐÔ¶³ÌͨÐÅʱ£¬±Ë´Ë¿ÉÒÔ·¢Ë͸÷ÖÖÀàÐ͵ÄÊý¾Ý¡£ÎÞÂÛÊǺÎÖÖÀàÐ͵ÄÊý¾Ý£¬¶¼»áÒÔ¶þ½øÖÆÐòÁеÄÐÎʽÔÚÍøÂçÉÏ´«ËÍ¡£·¢ËÍ·½ÐèÒª°ÑÕâ¸öJava¶ÔÏóת»»Îª×Ö½ÚÐòÁУ¬²ÅÄÜÔÚÍøÂçÉÏ´«ËÍ£»½ÓÊÕ·½ÔòÐèÒª°Ñ×Ö½ÚÐòÁÐÔÙ»Ö¸´ÎªJava¶ÔÏó¡£
¡¡¡¡°ÑJava¶ÔÏóת»»Îª×Ö½ÚÐòÁеĹý³Ì³ÆÎª¶ÔÏóµÄÐòÁл¯¡£
¡¡¡¡°Ñ×Ö½ÚÐòÁлָ´ÎªJava¶ÔÏóµÄ¹ ......

flexͨ¹ýblazedsÓëjavaͨÐŵÄСÀý×Ó

ºÜ¼òµ¥µÄСÀý×Ó£¬ÊʺϳõѧÕßÀí½â
1£¬JavaFlex.java
package flex;
public class JavaFlex {
public String helloJavaFlex(String name) {
return name;
}
}

2£¬remoting-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<service id="remoting-service" class="flex.messaging.services.Remo ......

Java»ù±¾Êý¾ÝÀàÐÍ

 ±äÁ¿,³£Á¿µÄ¸ÅÄî

  JavaÓïÑÔÖÐÓÐÎåÖÖ²»Í¬ÀàÐ͵ij£Á¿,

 
•1ÕûÐͳ£Á¿:ÈκÎÒ»¸öÕûÐÍÊý×Ö¾ÍÊÇÒ»¸öÕûÐͳ£Á¿.
–JavaÓïÑÔÖÐ,ÕûÐͳ£Á¿ÓÐÈýÖÖ±íʾ·½Ê½:
•Ê®½øÖÆ:0,1,2,3,4,5,6,7,8,9,10,11,12…¶¼ÊÇÊ®½øÖƵij£Á¿
•°Ë½øÖÆ:°Ë½øÖÆ¿ÍÁ÷Á¿Ö»ÄÜÓÃ0,1,2,3,4,5,6,7À ......

PHPµÄTokyoTyrantÀ©Õ¹½Ó¿ÚAPIÎĵµ(PECL)

ÊÖ²áµÄ¹Ù·½µØÖ·: http://us3.php.net/manual/en/book.tokyo-tyrant.php
¾ßÌåÄÚÈÝÈçÏÂ:
TCTÖ§³ÖµÄ×·¼Ó²ÎÊý:
mode:
bnum: ͰÊý×éÔªËØ¸öÊý,Èç¹û²»´óÓÚ0,ʹÓÃĬÈÏÖµ, ĬÈÏÖµÊÇ131071, ½¨ÒéÖµÊÇËùÓд洢µÄ¼Ç¼ÌõÊýµÄ0.5-4±¶.
apow: ºÍÒ»¸ökey¹ØÁªµÄ¼Ç¼Êý,Èç¹ûÊǸºÖµ, ʹÓÃĬÈÏÖµ, ĬÈÏֵΪ4, ÒâΪ2µÄ4´Î·½.
fpow: FreeBl ......

phpÀ©Õ¹¶à½ø³Ì¹²ÏíÄÚ´æ

²½Ö裺
1.ÔËÐÐÃüÁ./ext_skel --extname=sharemem
2.ÔËÐÐÃüÁ./configure --with-php-config=/usr/local/lnmp/php/bin/php-config
3.make clean
make
make install
/usr/local/lnmp/php/sbin/php-fpm restart
/usr/local/lnmp/php/bin/php-cgi /data0/htdocs/blog/sharemem.php
´úÂëÈçÏ£º
1.config.m4
PHP_A ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ