So this is probably something simple im just blindly overlooking but any help is much appreciated.
I have a simple FTP script that uploads an installation script, i have other FTP scripts on the site that work perfectly except this one. Here is the code:
[code=php]
$host = ftphost;
$dir = ftpdir;
$usr = ftplogin;
$fpw = ftppw;
}
if(substr($dir, 0, 1)!=’/’){
$dir = ‘/’.$dir; }
if(substr($dir, -1, 1)!=’/’){
$dir = $dir.’/’; }
set_time_limit(120);
$conn = ftp_connect($host);
if(!$conn)
{ftp_quit($conn); header(‘Location: ../adse.php?se=2’); die(); }
$auth = ftp_login($conn, $usr, $fpw);
if(!$auth){ftp_quit($conn); header(‘Location: ../adse.php?se=2’); die(); }
ftp_put($conn, $dir.”adm/modules/updater.php”,”../../PBRes/updater.php”,FTP_ASCII);
ftp_site($conn,”chmod 777 “.$dir.”adm/modules/updater.php”);
ftp_close($conn);
it gives me no errors (other than the chmod being unsuccessful due to no file there).
Thanks,
Jeremy