flash用php连接数据库的代码

yipeiwu_com6年前PHP代码库
php代码:
复制代码 代码如下:

/* /flashservices/services/Catalog.php */
class Catalog {
        var $products_array = array();

// Constructor: Contains the list of methods available to the gateway
function Catalog() {
        $this->methodTable = array (
                "getProducts" => array (
                        "description" => "Get list of products",
                        "access" => "remote",
                        "arguments" => "" // arguments could be optional, not tested
                )
        ); // end methodTable
}

function getProducts() {       
        // your code goes here

        return $this->products_array;
}
}

actionscript代码:
复制代码 代码如下:

#include "NetServices.as"
NetServices.setDefaultGatewayUrl("http://yourserver.com/flashservices/gateway.php");
gw = NetServices.createGatewayConnection();
CatalogREMOTE = gw.getService("Catalog", this);
CatalogREMOTE.getProducts();

getProducts_Result = function(result) {
        _root.products_results = result;

相关文章

Optimizer与Debugger兼容性问题的解决方法

ZendExtensionManager.dll——Zend扩展插件管理器 Zend扩展插件管理器最简安装教程: 1、安装Zend Optimizer 3.3.0a:https://ww...

php fsockopen伪造post与get方法的详解

fsockopen 伪造 post和get方法哦,如果你正在找 伪造 post和get方法的php处理代码这款不错哦。复制代码 代码如下:<?php//fsocket模拟post提...

PHP中for与foreach的区别分析

注意: 除非数组是被引用,foreach 所操作的是指定数组的一个拷贝,而不是该数组本身。因此数组指针不会被 each() 结构改变,对返回的数组单元的修改也不会影响原数组。 1. 自p...

PHP判断搜索引擎蜘蛛并自动记忆到文件的代码

复制代码 代码如下: function write_naps_bot(){ $useragent=get_naps_bot(); // echoExit($useragent); if...

PHP防注入安全代码

简述:/*************************    说明:    判断传递的变量中是否含有非法字符 &...