flash用php連接數(shù)據(jù)庫的代碼
更新時間:2011年04月21日 23:19:57 作者:
flash用php連接數(shù)據(jù)庫的代碼,需要的朋友可以參考下。
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;
}
您可能感興趣的文章:
- flash與asp/php/asp.net通信的方法
- PHP+FLASH實現(xiàn)上傳文件進度條相關文件 下載
- 使用PHP提取視頻網(wǎng)站頁面中的FLASH地址的代碼
- PHP生成Flash動畫的實現(xiàn)代碼
- flash+php+mysql打造簡單留言本教程
- 用PHP動態(tài)創(chuàng)建Flash動畫
- php讀取flash文件高寬幀數(shù)背景顏色的方法
- php中使用getimagesize獲取圖片、flash等文件的尺寸信息實例
- PHP實現(xiàn)仿百度文庫,豆丁在線文檔效果(word,excel,ppt轉flash)
- php獲取flash尺寸詳細數(shù)據(jù)的方法
相關文章
PHP使用curl請求實現(xiàn)post方式上傳圖片文件功能示例
這篇文章主要介紹了PHP使用curl請求實現(xiàn)post方式上傳圖片文件功能,結合實例形式分析了php使用curl進行文件傳輸?shù)南嚓P設置與使用操作技巧,需要的朋友可以參考下2018-06-06
php使用pdo連接報錯Connection failed SQLSTATE的解決方法
這篇文章主要介紹了php使用pdo連接報錯Connection failed SQLSTATE的解決方法,涉及針對配置文件的修改,具有一定的參考借鑒價值,需要的朋友可以參考下2014-12-12

