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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
maxmagnus
Forum Newbie
Posts: 2
Joined: Wed Jun 25, 2008 7:45 am

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

Post 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
maxmagnus
Forum Newbie
Posts: 2
Joined: Wed Jun 25, 2008 7:45 am

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

Post by maxmagnus »

Come on ppl you are supposed to be the best ...
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

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

Post 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.
Post Reply