PHP 与 JS 的另一种数据传递方式 序列化
从 PHP 3 开始为保存对象提供了一组序列化和反序列化的函数:serialize、unserialize,它可以方便的保存数据方便的做成CACHE,而存储体积也比XML要小的多,它结构与 JS 的 JSON 相拟,网上有一组用 JS 模拟 serialize 实现的方法,使用它可以和PHP 在数据传递上更紧密的结合.
JavaScript 版本(stable):http://www.devpro.it/code/102.html
Perl 版本(stable):http://hurring.com/code/perl/serialize/
另一个 Perl 版本:http://www.cpan.org/modules/by-module/PHP/JBROWN/php-serialization/
Python 版本(beta):http://hurring.com/code/python/serialize/
Java 版本(pre-alpha):http://hurring.com/code/java/serialize/
Ruby 版本:http://www.aagh.net/files/ruby/php_serialize.rb
Flash/Actionscript 版本: http://sourceforge.net/projects/serializerclass/
C# 版本:http://sourceforge.net/projects/csphpserial/
相关文档:
<?php
//定义一个数组
$arr = array(0=>"zero", 1=>"one", 2=>"two");
//使用第一种方法对数组进行遍历
foreach ($arr as $value) {
echo "Value: $value; ";
}
echo "<BR>";&nb ......
Perl is a language often associated with text processing and CGI. PHP is
a language often associated with dynamic Web pages. Both are very popular
with Web developers. Often, each of these languages is used at the expense of
the other. Hard-core Perl developers would love to develop everyth ......
ob_start();
echo "<pre>";
print_r($content);
echo "</pre>";
$a=ob_get_contents();
$filename = $_SERVER['DOCUMENT_ROOT']."/log-".date("Y-m-d").".txt";
$file = fopen($filename, "a");
$tipmsg = "\r\n******Final File: "
//.end(explode('/',$_SERVER['PHP_SELF']))
.$_SERV ......
作者:Ph4nt0m Security Team
来源:http://www.ph4nt0m.org-a.googlepages.com/PSTZine_0x03_0x06.txt
==Ph4nt0m Security Team==
Issue 0x03, Phile #0x06 of 0x07
|=---------------------------------------- ......