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/
相关文档:
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 ......
本范例只能在windows平台下正确运行。编辑器是可以在windows或linux下运行,与平台无关。
配置步骤:
1)webnoteeditor_phpsample文件夹放到网站的目录"webnoteeditor_phpsample"下
2)doc文件夹放到网站目录"doc"下
3)通过 http://localhost/webnoteeditor_phpsample/index.php 来访问
在Windows下,建议使用EasyPHP来 ......
1、嵌入方法:
类似ASP的<%,PHP可以是<?php或者是<?,结束符号是?>,当然您也可以自己指定。
2、引用文件:
引用文件的方法有两种:require 及 include。
require 的使用方法如 require("MyRequireFile.php"); 。这个函数通常放在 PHP 程序的最前面,PHP 程序在执行前,就会先读入 require 所指定引入 ......
作者:Ph4nt0m Security Team
来源:http://www.ph4nt0m.org-a.googlepages.com/PSTZine_0x03_0x06.txt
==Ph4nt0m Security Team==
Issue 0x03, Phile #0x06 of 0x07
|=---------------------------------------- ......