Re: [PHP] Delete a file via FTP (without PHP FTP support)

2002-11-07 Thread Ernest E Vogelsinger
At 07:14 07.11.2002, Charles Wiltgen said:
[snip]
// Delete a file via FTP
function deleteFileViaFTP($ftpServer, $user, $password, $ftpDir, $ftpFile) {
[snip] 

or, if you have FTP support built in:

$user = '**user**';
$pass = '**pass**';
$ftphost = 'ftp_host';
$ftpfile = '/www/sample.html';


$fp = ftp_connect($ftphost);
if ($fp) {
$login = ftp_login ($fp, $user, $pass); 
ftp_delete ($fp, $ftpfile); 
ftp_quit($fp);
}
else die('Cannot connect to FTP');



-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Delete a file via FTP (without PHP FTP support)

2002-11-07 Thread Charles Wiltgen
Ernest E Vogelsinger wrote...

 or, if you have FTP support built in:

Yeah, a much better option if it's available.

It isn't for me, and I can't use it as a final solution, so I'm still
looking for a way to write files locally without using it.  I wish PHP just
gave me the ability read and write files as another user, my problems would
be solved.

-- Charles Wiltgen


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php