配置支持Amfphp1.9的Web应用
新功能:
1、AMF3支持:包含了RemoteObject,你可以尽情用在Flex2上。
2、JSON(Javascrīpt Object Notation,轻量级的数据交换格式)支持:附加到gateway.php,现在json.php将使你更好的在Flash中使用自己的JSON服务。这里有两个例子:MochiKit 和 Spry。XML-RPC 同样被支持。
3、一个新的浏览器。值得一提的是例程MochiTest同样是可以使用在JSON模式的例程。所以你可以自己证实它的确可以同时运行在AMP和JSON模式下。
4、$this->methodTable的最后。 从现在开始是可以被忽略的。所有的Methods都可以间接的使用默认值。
安装Amfphp 1.9 beta 2
目前amfphp1.9的最新版是amfphp1.9 beta2,可以到 http://www.5etdemi.com/uploads/amfphp-1.9.beta.20070126.zip下载。将其解压缩到硬盘,拷贝到apache的web目录下。键入http://localhost:8080/amfphp/gateway.php,会出现amfphp网关的一个说明文件。AMFPHP基本的安装已经完成。
四、安装AMF扩展
最新版的AMFPHP加入了一个AMF扩展:它是用C写了一个AMF协议的解码和编码器,执行效率大大提升。尤其是大的数据源的时候,用php编码可能会超时而不能完成的操作,用AMF扩展就可以完成。 安装比较简易:
1. 下载
到http://www.teslacore.it/projects/amfext/amfext-0.8.7a-bin.zip下载,将php_amf.dll解压缩到PHP根路径下ext中。
2. 配置
打开php.ini,加上下面这一行:extension=php_amf.dll
我们不需要对AMFPHP 本身做任何修改或者配置。系统会自动监测那个扩展是否存在,存在就会自动应用,否则就会使用PHP的解码和编码。
好了,将其web共享,别名为flashservices。支持Amfphp的Web应用就配置好了。我们只需要将写好远程服务类放到Amfphp根目录services中就可以在Flash和Flex中访问了。
五、本地化设置
因为PHP默认的编码语言是ISO-8859-1,要使前面配置的Web应用支持简体中文,最好的方法是打开Amfphp根路径下的gateway.php,将 $gateway->setCharsetHandler("utf8_decode", "ISO-8859-1", "ISO-8859-1");修改为$gateway->setCharsetHandler("iconv", "GBK", "GBK");即可。要解决MySQL中的中文乱码问题,请用mysql_query("set names ''gbk''");。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

In this chapter, we are going to learn the following topics related to routing ?

Working with database in CakePHP is very easy. We will understand the CRUD (Create, Read, Update, Delete) operations in this chapter.

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Validator can be created by adding the following two lines in the controller.
