note 83308 added to function.ftp-put

From: Date: Tue, 20 May 2008 10:45:28 +0000
Subject: note 83308 added to function.ftp-put
Groups: php.notes 
Request: Send a blank email to php-notes+get-139552@lists.php.net to get a copy of this message
Took me forever to work out but this will work if you get the paths right! <?php function ftp_copy($file) { global $conn_id; $ftp_root = '/public_html/'; $site_root = '/home/usr/public_html/'; return ftp_put($conn_id, $ftp_root . $file, $site_root . $file, FTP_BINARY); } ?> Login to your site using an FTP client to retrieve the $ftp_root Use something like getcwd() to get the $site root ---- Server IP: 92.48.74.199 Probable Submitter: 85.189.140.136 ---- Manual Page -- http://www.php.net/manual/en/function.ftp-put.php Edit -- https://master.php.net/note/edit/83308 Del: integrated -- https://master.php.net/note/delete/83308/integrated Del: useless -- https://master.php.net/note/delete/83308/useless Del: bad code -- https://master.php.net/note/delete/83308/bad+code Del: spam -- https://master.php.net/note/delete/83308/spam Del: non-english -- https://master.php.net/note/delete/83308/non-english Del: in docs -- https://master.php.net/note/delete/83308/in+docs Del: other reasons-- https://master.php.net/note/delete/83308 Reject -- https://master.php.net/note/reject/83308 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#139552) next »