You are here: Re: ftp extensions « All PHP « IT news, forums, messages
Re: ftp extensions

Posted by Richard Walker on 06/12/06 09:59

pieter_hordijk@hotmail.com wrote:
> can you post your code plz...
>
> Richard Walker schreef:
>
>> Hi
>>
>> Using php 4.3.8 with ftp enabled (shows as such in phpinfo) but still
>> can't use ftp functions eg ftp_connect(<server>) gives Call to Undefined
>> Function. I've Googled til I'm google eyed but although I can find lots
>> of references to this, can't seem to find an answer. Please will someone
>> help?
>>
>> TIA
>> --
>> Richard
>

I've done some more testing. The code runs OK in a browser from an html
form, but I want to run it as part of a prog run from a cron job, so
just as a script. Why doesn't this work?

#!/usr/local/bin/php -q
<?php
$conn=ftp_connect("slaughdensailingclub.co.uk")or die("no conn");
ftp_login($conn,"username","password") or die("no login");
$upload=ftp_put($conn,"remote_filename","local_filename",FTP_BINARY);
if (!$upload) echo "no upload";
else echo "upload ok";
?>

--
Richard

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация