سلام من php در حد مبتدیه
فقط کارم گیر کرده و میخوام که از بانک روی هاست یک آرایه 2 بعدی شامل ردیف ها و داده ها میشه رو بگیرم
توسط فانکشن زیر و به وسیله nusoap که بلد نیستم چطور باید قسمت تنظیماتش رو نوشت برگردونم اینم از کد
خیلی واسم مهمه لطفا کمک کنین با تشکر
<?php
require_once("nuSOAP/lib/nusoap.php");
//define connection string, specify database driver
function RunScript($DataBaseName,$SqlScript ,$headers){
$DataBaseName= "=?UTF-8?B?".base64_encode($DataBaseName)."?=";
$SqlScript = "=?UTF-8?B?".base64_encode($SqlScript )."?=";
$headers= "=?UTF-8?B?".base64_encode($headers)."?=";
$conn = new COM ("ADODB.Connection") or die("Cannot start ADO");
$connStr = "PROVIDER=Microsoft.Ace.OLEDB.12.0;Data Source= \UpdateDB.mdb";
$conn->open($connStr); //Open the connection to the database
if($conn){
$arr= array();
$sql=$SqlScript ;
$row=odbc_exec($conn, $sql);
for ($i=0; $i < $num_columns; $i++){
$arr[$i][0] = $row->Fields(0);
$arr[$i][1] = $row->Fields(1);
$arr[$i][2] =$row->Fields(2);
$arr[$i][3] = $row->Fields(3);
$arr[$i][4] = $row->Fields(4);
$arr[$i][5] = $row->Fields(5);
$arr[$i][6] = $row->Fields(6);
}
return $arr;
odbc_close($conn);
//$conn->close();
}
$namespace = "http://localhost.com/DMail";
// create a new soap server
$server = new soap_server();
// configure our WSDL
$server->configureWSDL("UpdateService");
$server ->defencoding = 'utf-8';
$server ->soap_defencoding = 'utf-8';
$server ->decode_utf8 = false;
// set our namespace
$server->wsdl->schemaTargetNamespace = $namespace;
$server->wsdl->addComplexType(
'ArryName',
'complexType',
'struct',
'all',
'',
array(
'eventId'=>array('name'=>'eventId','type'=>'xsd:in t'),
'eventName'=>array('name'=>'eventName','type'=>'xs d:string'))
);
$server->register(
// method name:
'RunScript',
// parameter list:
array('DataBaseName' => 'xsd:string', 'SqlScript' => 'xsd:string', 'headers' => 'xsd:string'),
// return value(s):
array('return'=>'tns:ArryName'),
// namespace:
$namespace,
// soapaction: (use default)
false,
// style: rpc or document
'rpc',
// use: encoded or literal
'encoded',
// description: documentation for the method
'A simple World Mail Sender web method');
// Get our posted data if the service is being consumed
// otherwise leave this data blank.
$POST_DATA = isset($GLOBALS['HTTP_RAW_POST_DATA'])
? $GLOBALS['HTTP_RAW_POST_DATA'] : '';
// pass our posted data (or nothing) to the soap service
$server->service($POST_DATA);
exit();
?>
میدونم این قسمت غلط نوشتم لطفا یکی کمکم کنه و درستش رو بنویسه مرسی
$server->wsdl->addComplexType(
'ArryName', 'complexType', 'struct', 'all', '',
array( 'eventId'=>array('name'=>'eventId','type'=>'xsd:in t'),
'eventName'=>array('name'=>'eventName','type'=>'xs d:string')) );