flash用php連接數(shù)據(jù)庫的代碼
更新時(shí)間: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;
}
復(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)站頁面中的FLASH地址的代碼
- PHP生成Flash動(dòng)畫的實(shí)現(xiàn)代碼
- flash+php+mysql打造簡單留言本教程
- 用PHP動(dòng)態(tài)創(chuàng)建Flash動(dòng)畫
- php讀取flash文件高寬幀數(shù)背景顏色的方法
- php中使用getimagesize獲取圖片、flash等文件的尺寸信息實(shí)例
- PHP實(shí)現(xiàn)仿百度文庫,豆丁在線文檔效果(word,excel,ppt轉(zhuǎn)flash)
- php獲取flash尺寸詳細(xì)數(shù)據(jù)的方法
相關(guān)文章
php.ini-dist 和 php.ini-recommended 的區(qū)別介紹(方便開發(fā)與安全的朋友)
在下載php后,進(jìn)行配置的時(shí)候,會(huì)出現(xiàn)兩個(gè)php.ini:php.ini-dist和php.ini-recommended,那有什么不同呢?應(yīng)該如果選擇適合自己的版本呢2012-07-07PHP?array_combine()?函數(shù)內(nèi)置函數(shù)
這篇文章主要介紹了PHP?array_combine()函數(shù)內(nèi)置函數(shù),array_combine()是PHP中的一個(gè)內(nèi)置函數(shù),用于組合兩個(gè)數(shù)組并通過使用一個(gè)數(shù)組作為鍵和另一個(gè)數(shù)組作為值來創(chuàng)建一個(gè)新數(shù)組2022-09-09PHP7下協(xié)程的實(shí)現(xiàn)方法詳解
最近在學(xué)習(xí)中遇到了協(xié)程,發(fā)現(xiàn)這類文章介紹的較少,所以下面這篇文章主要給大家介紹了關(guān)于PHP7下協(xié)程的實(shí)現(xiàn)方法,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧。2017-12-12php cli模式學(xué)習(xí)(PHP命令行模式)
之前知道php—cli模式是一種類似shell命令式的執(zhí)行php程序,不過一直以為這個(gè)是一種落后的方式,應(yīng)該沒有什么意義,因?yàn)閺臎]有遇到過使用這個(gè)cli模式編程的。不過今天遇到了使用cli模式的應(yīng)用2013-06-06The 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ā)郵件及獲取通訊錄列表的方法,實(shí)例分析了php實(shí)用curl模擬登陸163郵箱的操作技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下2015-03-03php進(jìn)程daemon化的正確實(shí)現(xiàn)方法
守護(hù)進(jìn)程(Daemon)是運(yùn)行在后臺(tái)的一種特殊進(jìn)程。下面這篇文章主要給大家介紹了關(guān)于php進(jìn)程daemon化的正確實(shí)現(xiàn)方法,文中通過示例代碼介紹的非常詳細(xì),需要的朋友可以參考借鑒,下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2018-09-09