flash用php連接數據庫的代碼
更新時間:2011年04月21日 23:19:57 作者:
flash用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;
}
復制代碼 代碼如下:
/* /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;
}
相關文章
php.ini-dist 和 php.ini-recommended 的區(qū)別介紹(方便開發(fā)與安全的朋友)
在下載php后,進行配置的時候,會出現(xiàn)兩個php.ini:php.ini-dist和php.ini-recommended,那有什么不同呢?應該如果選擇適合自己的版本呢2012-07-07The specified CGI application misbehaved by not returning a
The specified CGI application misbehaved by not returning a complete set of HTTP headers2011-03-03PHP模擬登陸163郵箱發(fā)郵件及獲取通訊錄列表的方法
這篇文章主要介紹了PHP模擬登陸163郵箱發(fā)郵件及獲取通訊錄列表的方法,實例分析了php實用curl模擬登陸163郵箱的操作技巧,具有一定參考借鑒價值,需要的朋友可以參考下2015-03-03