Все тот же uppload(
ГДЕ ОШИБКА???????????????
не может конектиться к базе что надо изменить?
Слова парсера:
Fatal error: Call to undefined function: ftp_connect() in /usr/home/tonka/ftp/upload.php on line 12.......( если бы он говорил что надо именить и как)
<form enctype="multipart/form-data" action="upload.php" method="POST">
<input type="hidden" name="f" value="1">
Send this file: <input name="userfile" type="file">
<input type="submit" value="Send File">
</form>
<?php
if (isset ($_POST['f']))
{
$file=$_FILES['userfile'];
$remote_file=$_FILES['userfile'];
$ftp_server= 'ftp://desigto@10.0.2.5/sit/news_images/';
$conn_id = ftp_connect($ftp_server);
$ftp_user_name='desigto';
$ftp_user_pass='desigto';
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass,'w');
if (ftp_fput($conn_id, $remote_file, $file, FTP_ASCII)) {
echo "successfully uploaded $file\n";
} else {
echo "There was a problem while uploading $file\n";
}
ftp_close($conn_id);
}
?>
<a href='ftp://desigto@10.0.2.5/sit/news_images/'> link</a>
|