php爬取flash的交互数据库,flash用php连接数据库的代码

flash用php连接数据库的代码

发布于 2014-11-06 14:58:36 | 91 次阅读 | 评论: 0 | 来源: 网友投递

PHP开源脚本语言PHP(外文名: Hypertext Preprocessor,中文名:“超文本预处理器”)是一种通用开源脚本语言。语法吸收了C语言、Java和Perl的特点,入门门槛较低,易于学习,使用广泛,主要适用于Web开发领域。PHP的文件后缀名为php。

本文为大家讲解的是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;

}

相关阅读:

flash用php连接数据库的代码

php读取txt文件组成SQL并插入数据库的代码

用PHP书写安全的脚本代码

用php解析html的示例代码

简单的php写入数据库类代码

PHP备份/还原MySQL数据库的代码

用php过滤危险html代码的函数

用PHP连接Oracle数据库

php使用sql server验证连接数据库的方法

PHP使用ODBC连接数据库的方法

PHP连接数据库实现注册页面的增删改查操作

PHP表单数据写入MySQL数据库的代码

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值