flash用php连接数据库的代码_PHP教程
程序员文章站
2022-04-17 16:58:56
...
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;
}
复制代码 代码如下:
/* /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;
}
上一篇: mvvm框架有哪些?
下一篇: win10无法进入桌面怎么办
推荐阅读
-
连接到txt文本的超链接,不直接打开而是点击后下载的处理方法_PHP教程
-
PHP杂谈《重构-改善既有代码的设计》之重新组织你的函数_PHP教程
-
PHP删除Array数组里指定的key(完整版,已封装成函数,附测试代码)_PHP教程
-
PHP Cookei记录用户历史浏览信息的代码,phpcookei_PHP教程
-
PHP 开发中数据库及其相关软件的选型考虑_PHP教程
-
使用php与ftp数据库连接代码
-
用PHP伪造referer突破网盘禁止外连的代码_PHP
-
简单的php写入数据库类代码分享_PHP
-
用mysql内存表来代替php session的类_PHP教程
-
sql2000数据库 PHP用mysql数据库存储session的代码