Page 1 of 1

ftp DL working on my server but refuses to work on 2 other

Posted: Wed Jun 25, 2008 7:52 am
by maxmagnus
Hi to all,
I guess subject is self explanatory so here is code

Code: Select all

 
<?php
 
$ftp_server = '********';
$ftp_user = '****';
$ftp_pass = '*******';
error_reporting (
E_NOTICE |
E_ERROR |
E_WARNING |
E_PARSE |
E_CORE_ERROR | E_CORE_WARNING |
E_COMPILE_ERROR | E_COMPILE_WARNING |
E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE
);
 
 
$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server");
if (@ftp_login($conn_id, $ftp_user, $ftp_pass)) {
}
else {
echo "Couldn't connect ";
}
$localfile = 'nekki_fajl.jpg';
$fp = fopen ($localfile, 'wb');
if(!$fp)
echo "<BR> nije moguce otvaranje lokalnog fajla <BR>";
ftp_get($conn_id, "PancicVrhKrcmar.jpg", "/mesto1/nekki_fajl.jpg", FTP_ASCII);
ftp_close($conn_id);
 
//prikaz slike
$imagename = "nekki_fajl.jpg";
$PATH="";
header("Content-Disposition: inline; filename=$PATH/$imagename");
echo"<form name='neka_forma'>";
 
echo '<img src="nekki_fajl.jpg">';
echo"</form>";
?>
yes I know the if statement can be written better, I've changed it and it causes same problem clean or this way... I might make worse mistake if I try to change it here and thus make this discussion go in other direction...

tnx in advance for your answers

oh yes and this had caused me a lot of :banghead: so I went a bit :crazy: because of it

Re: ftp DL working on my server but refuses to work on 2 other

Posted: Wed Jun 25, 2008 7:55 pm
by maxmagnus
Come on ppl you are supposed to be the best ...

Re: ftp DL working on my server but refuses to work on 2 other

Posted: Sat Jun 28, 2008 3:30 pm
by John Cartwright
Your lack of answers is probably because you posted in the wrong forum, as well as not posting with php tags.

Moved to PHP-Code.

P.S., we are the best? :D jk, of course we are.