Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function copy($key){
- // return;
- $db = '';
- $user = '';
- $pass = '';
- $whtree = '';
- try {
- $ToolkitServiceObj = ToolkitService::getInstance($db, $user, $pass, $extension);
- }catch (Exception $e) {
- echo $e->getMessage(), "\n";
- exit();
- }
- $ToolkitServiceObj->setToolkitServiceParams(array('stateless'=>true));
- $ToolkitServiceObj->setToolkitServiceParams(array('debug'=>true));
- $cmd = "addlible " .DB_FILELIB;
- $ToolkitServiceObj->CLCommand($cmd);
- $cmd = "addlible WCPLIB";
- $ToolkitServiceObj->CLCommand($cmd);
- $cmd = "addlible WCPWEB";
- $ToolkitServiceObj->CLCommand($cmd);
- $cmd = "addlible APLUS10M";
- $ToolkitServiceObj->CLCommand($cmd);
- $cmd = "addlible APLUS10";
- $ToolkitServiceObj->CLCommand($cmd);
- $param[] = $ToolkitServiceObj->AddParameterChar('both', 21,'KEY', 'KEY', $key);
- $result = $ToolkitServiceObj->PgmCall("CPYSHPLST", "WCPLIB", $param, null, null);
- $message = "";
- if($result){
- $message = $result['io_param']['RETMESSAGE'];
- }else{
- $code = $ToolkitServiceObj->getErrorCode();
- $msg = $ToolkitServiceObj->getErrorMsg();
- // return "Execution failed.".$code.'-'.$msg;
- }
- /* Do not use the disconnect() function for "state full" connection */
- $ToolkitServiceObj->disconnect();
- return $message;
- }
Add Comment
Please, Sign In to add comment