flash用php連接數(shù)據(jù)庫(kù)的代碼
更新時(shí)間:2011年04月21日 23:19:57 作者:
flash用php連接數(shù)據(jù)庫(kù)的代碼,需要的朋友可以參考下。
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;
}
復(fù)制代碼 代碼如下:
/* /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代碼:
復(fù)制代碼 代碼如下:
#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實(shí)現(xiàn)上傳文件進(jìn)度條相關(guān)文件 下載
- 使用PHP提取視頻網(wǎng)站頁(yè)面中的FLASH地址的代碼
- PHP生成Flash動(dòng)畫(huà)的實(shí)現(xiàn)代碼
- flash+php+mysql打造簡(jiǎn)單留言本教程
- 用PHP動(dòng)態(tài)創(chuàng)建Flash動(dòng)畫(huà)
- php讀取flash文件高寬幀數(shù)背景顏色的方法
- php中使用getimagesize獲取圖片、flash等文件的尺寸信息實(shí)例
- PHP實(shí)現(xiàn)仿百度文庫(kù),豆丁在線(xiàn)文檔效果(word,excel,ppt轉(zhuǎn)flash)
- php獲取flash尺寸詳細(xì)數(shù)據(jù)的方法
相關(guān)文章
php中CI操作多個(gè)數(shù)據(jù)庫(kù)的代碼
最近有個(gè)需求,做一個(gè)獨(dú)立后臺(tái)出來(lái),這個(gè)獨(dú)立后臺(tái)有單獨(dú)的庫(kù),單獨(dú)的url,單獨(dú)…。但是,這里邊只是一些基礎(chǔ)數(shù)據(jù),而使用者需要通過(guò)該庫(kù)查看另一個(gè)庫(kù)里的統(tǒng)計(jì)數(shù)據(jù)。這就帶來(lái)一個(gè)問(wèn)題:我需要在控制器里邊可以同時(shí)操作兩個(gè)數(shù)據(jù)庫(kù),而且這兩個(gè)庫(kù)毫不相干2012-07-07
PHP使用curl請(qǐng)求實(shí)現(xiàn)post方式上傳圖片文件功能示例
這篇文章主要介紹了PHP使用curl請(qǐng)求實(shí)現(xiàn)post方式上傳圖片文件功能,結(jié)合實(shí)例形式分析了php使用curl進(jìn)行文件傳輸?shù)南嚓P(guān)設(shè)置與使用操作技巧,需要的朋友可以參考下2018-06-06
php使用pdo連接報(bào)錯(cuò)Connection failed SQLSTATE的解決方法
這篇文章主要介紹了php使用pdo連接報(bào)錯(cuò)Connection failed SQLSTATE的解決方法,涉及針對(duì)配置文件的修改,具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2014-12-12

