[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7914] import: testing
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [7914] import: testing |
Date: |
Fri, 21 Oct 2011 12:30:37 +0000 |
Revision: 7914
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7914
Author: sigurdne
Date: 2011-10-21 12:30:36 +0000 (Fri, 21 Oct 2011)
Log Message:
-----------
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-21
12:11:15 UTC (rev 7913)
+++ trunk/property/inc/cron/default/Import_fra_basware_X205.php 2011-10-21
12:30:36 UTC (rev 7914)
@@ -256,13 +256,6 @@
// allright, we're in!
echo "okay: logged in...<br/>";
- // execute a command
-/*
- if (!($stream = ssh2_exec($connection,
"ls -al {$directory_remote}" )))
- {
- echo "fail: unable to execute
command\n";
- }
-*/
// Enter "sftp" mode
$sftp = @ssh2_sftp($connection);
@@ -275,47 +268,28 @@
{
if (is_dir($file))
{
- echo "Directory:
$file\n";
+ echo "Directory:
$file<br/>";
continue;
}
- $size =
filesize("ssh2.sftp://$sftp$directory_remote/$file");
- echo "File $file Size: $size\n";
+/* $size =
filesize("ssh2.sftp://$sftp$directory_remote/$file");
+ echo "File $file Size:
$size<br/>";
$stream =
@fopen("ssh2.sftp://$sftp$directory_remote/$file", 'r');
$contents = fread($stream,
filesize("ssh2.sftp://$sftp$directory_remote/$file"));
- @fclose(@stream);
-
+ @fclose($stream);
echo "CONTENTS:
$contents<br/><br/>";
+*/
$arr[] = $file;
}
- echo "collect returning data from
command<br/>";
if ($debug)
{
-
_debug_array($arr);
-/*
- stream_set_blocking($stream,
true);
- $data = "";
- while ($buf =
fread($stream,4096))
- {
- $data .= $buf;
- }
- fclose($stream);
- _debug_array($data);
-*/
-
}
else
{
- $com ="ls {$directory_remote}";
- $stream =
ssh2_exec($connection, $com);
-
stream_set_blocking($stream,true);
- $cmd = fread($stream,4096);
- $arr=explode("\n",$cmd);
$total_files=count($arr);
- $sftp = ssh2_sftp($connection);
// _debug_array($arr);
for($i=0;$i<$total_files;$i++)
{
@@ -334,11 +308,9 @@
}
}
}
- fclose($stream);
}
}
}
-
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7914] import: testing,
Sigurd Nes <=