易截截图软件、单文件、免安装、纯绿色、仅160KB

php记录3月份

【2010/3/8】
1:
array_pop($array());//php中删除数组最后一个元素
array_shift($array());//删除第一个元素
2:
java1.5上写的程序,让放在java1.4的服务器上运行,如何办,上网搜索了一下,
可以下一个字节码转换工具,将1.5编译的*.class文件转换成1.4的,有一个叫Retrotranslator的工具。
How to use Retrotranslator from the command line?
   1. Download and unzip the binary distribution file Retrotranslator-n.n.n-bin.zip, where n.n.n is the latest Retrotranslator release number.
   2. Compile your classes with Java 5.0 or Java 6 and put them into some directory, e.g. myclasses.
   3. Go to the unzipped directory and execute:
      java -jar retrotranslator-transformer-n.n.n.jar -srcdir myclasses
      Use appropriate options to verify the result and for troubleshooting, e.g. -verify, -classpath, -advanced, and -smart.
   4. Put retrotranslator-runtime-n.n.n.jar and backport-util-concurrent-n.n.jar into the classpath of your application if you use the Java 5.0 API.
   5. Run or debug the application as usual on Java 1.4.
The command line syntax:
java -jar retrotranslator-transformer-n.n.n.jar <options>
or
java -cp retrotranslator-transformer-n.n.n.jar net.sf.retrotranslator.transformer.Retrotranslator <options>
详细步骤
在java1.4环境下:
a:
将写好的1.5环境下的classes文件放到一起,比如目录1.5classes下。
b:
然后进入相关目录,新建一个1.4classes的目录,然后确认目录无误后,执行下条命令:
java -jar retrotranslator-transformer-1.2.9.jar -srcdir 1.5classes -destdir 1.4classes
c:
在 1.4环境下打jar包
进入到1.4classes文件夹下,执行下列命令:
jar cvfm weqiqiserver.jar manifest.mf *
d:
把下载的Retrotranslator-1.2.9-bin文件夹下的
backport-util-concurrent-3.1.jar
backport-util-concurrent-java12-3.1.jar
retrotranslator-runtime13-1.2.9.jar
retrotranslator-runtime-1.2.9.jar
retrotranslator-transformer-1.2.9.jar
放到java1.4版本的$JAVA_HOME/jre/lib/ext目录下


相关文档:

Nginx web+php web服务器的搭建

Linux版本: Red Hat Enterprise Linux 5
Nginx版本: nginx 0.8.34
PHP版本:    php 5.2.13
MySQL版本:5.0.22
php所需支持库:libiconv、libmcrypt、mhash、mcrypt
1、编译安装php所需支持库
# tar zxvf libiconv-1.13.tar.gz
# cd libiconv-1.13/
# ./configure --prefix=/usr/local
# make &a ......

PHP类的精缩归纳

一:结构和调用(实例化):
class className{} ,调用:$obj = new className();当类有构造函数时,还应传入参数。如$obj = new className($v,$v2...);
二:构造函数和析构函数:
1、构造函数用于初始化:使用__construct(),可带参数。
2、但析构函数不能带参数(用于在销去一个类之前执行一些操作或功能)。析构函数用 ......

linux下安装php_mbstring扩展


phpMyAdmin提示没字符串编码和字符串处理库php_mbstring
SSH连接上后:yum install php-mbstring安装扩展
vi usr/local/lxlabs/ext/php/etc/php.ini编辑PHP.ini文件
去掉一行的注释:extension=mbstring.so
(有些可以不用设置这两行,php.ini中不存在;extension=mbstring.so

只要mbString扩展安装到了extension ......

php自用数据缓存类

刚换了一个工作,现在没什么事做,写了一个数据缓存的类。
可以缓存数组,字符,对象等,执行效率还没有测试,先放出来吧。
实例如下:
 * @example
 * require 'MyCache.class.php';
 * $mc = new MyCache("./test/cache");
 * $a = "hello world111";
 * $mc->set("ss", $a);
  ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号