fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [7930] property: import testing


From: Sigurd Nes
Subject: [Fmsystem-commits] [7930] property: import testing
Date: Mon, 24 Oct 2011 16:35:50 +0000

Revision: 7930
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7930
Author:   sigurdne
Date:     2011-10-24 16:35:50 +0000 (Mon, 24 Oct 2011)
Log Message:
-----------
property: import testing

Modified Paths:
--------------
    trunk/property/inc/cron/default/Import_fra_basware_X205.php

Modified: trunk/property/inc/cron/default/Import_fra_basware_X205.php
===================================================================
--- trunk/property/inc/cron/default/Import_fra_basware_X205.php 2011-10-24 
16:16:50 UTC (rev 7929)
+++ trunk/property/inc/cron/default/Import_fra_basware_X205.php 2011-10-24 
16:35:50 UTC (rev 7930)
@@ -289,7 +289,16 @@
 _debug_array($file_name);
                                                                $file_remote = 
"{$directory_remote}/{$file_name}";         
                                                                $file_local = 
"{$directory_local}/{$file_name}";
-                                                               
if(ssh2_scp_recv($connection, $file_remote,$file_local))
+
+                                                               $stream = 
fopen("ssh2.sftp://$sftp$file_remote";, 'r');
+                                                               $contents = 
fread($stream, filesize("ssh2.sftp://$sftp$file_remote";));
+                                                               fclose($stream);
+
+                                                               $fp = 
fopen($file_local, "wb");
+                                                               
fwrite($fp,$contents);
+                               
+                                                               if(fclose($fp))
+//                                                             
if(ssh2_scp_recv($connection, $file_remote,$file_local))
                                                                {
                                                                        echo 
"File remote: ".$file_remote." was copied to local: $file_local<br/>";
                                                                        if( 
ssh2_sftp_rename ($sftp, $file_remote, 
"{$directory_remote}/archive/{$file_name}" ))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]