Home php教程 PHP源码 配置支持Amfphp1.9的Web应用

配置支持Amfphp1.9的Web应用

Jun 08, 2016 pm 05:31 PM
gateway json php quot

<script>ec(2);</script>

新功能:
 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''");

 

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

CakePHP Project Configuration CakePHP Project Configuration Sep 10, 2024 pm 05:25 PM

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

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

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

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

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

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

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

CakePHP Routing CakePHP Routing Sep 10, 2024 pm 05:25 PM

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

CakePHP Working with Database CakePHP Working with Database Sep 10, 2024 pm 05:25 PM

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

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

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

CakePHP Creating Validators CakePHP Creating Validators Sep 10, 2024 pm 05:26 PM

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

See all articles