Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Прочее";
Текущий архив: 2006.06.11;
Скачать: [xml.tar.bz2];

Вниз

PHP   Найти похожие ветки 

 
imasd   (2006-05-17 20:37) [0]

Здравствуйте.
Такой вопрос, есть скрипт, который закачивает файлы на сайт.
Не работает, показывает следующие предупреждения, из за чего это может быть?

Warning: mail() has been disabled for security reasons in /home3/musulman/public_html/upload/upload.php on line 52

Warning: mail() has been disabled for security reasons in /home3/musulman/public_html/upload/upload.php on line 54


Сам скрипт:

<?

/* Easy Uploader */

// set variables (SET THESE TO SUIT YOUR CIRCUMSTANCES):

// Upload directory (MUST HAVE TRAILING SLASH):
$uploaddir="/home3/musulman/public_html//upload/";
// Your email
$youremail="you@your-domain.co.uk";
// Thank you page:
$thankspage="http://www.your-domain.co.uk/thanks.htm";

// Set Upload thanks message for USER
$uptymessage="$realname, thank you for uploading the file $file_name\n\nWe will get back to you ASAP.";
// Set Upload thanks message for OWNER
$ownermessage="$realname [ $email ] has uploaded a file named $file_name\n\nCheck the upload directory.";
// Email message on or off ?  1 = on, 0 = off
$emailmessages = "1";

// start code (DO NOT CHANGE ANYTHING BELOW THIS LINE):

// Check for valid email address

$x = ereg("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$",$email);

if($x==0)

// if no valid email address entered, display no email message
{
echo "<div align=center>You must specify a valid email address for yourself. <a href=javascript:history.back(-1)>Return to the form</a>.</div>";
}
else {

// Check to see if valid file
if ($file == "none") {
// if no valid email address entered, display no file message
echo "<div align=center>You must specify a file to upload. <a href=javascript:history.back(-1)>Return to the form</a>.</div>";
}
else {
//directory to upload to
copy($file, $uploaddir.$file_name);
unlink($file);

//return thank you page
Header("Location: $thankspage");
}
}
if ($emailmessages == "1") {
//mail you to let you know a new uploaded file
mail("$youremail", "Uploaded file", "$ownermessage");
//mail user to thank them
mail("$email", "Uploaded file", "$uptymessage");
exit;
}

?>


За ранее спасибо


 
дядя   (2006-05-17 20:54) [1]

На хостинге ф-ция mail() отключена обращайся к хостеру или правь свой php.ini



Страницы: 1 вся ветка

Форум: "Прочее";
Текущий архив: 2006.06.11;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.44 MB
Время: 0.013 c
15-1147762292
pavel_guzhanov
2006-05-16 10:51
2006.06.11
Windows &amp; Linux, переустановка Windows


15-1147929575
Ega23
2006-05-18 09:19
2006.06.11
С Днём рождения! 18 мая


15-1147629954
Imbac
2006-05-14 22:05
2006.06.11
Определить что на фотографии человек или машина


2-1148591788
TButton
2006-05-26 01:16
2006.06.11
корень третей степени


15-1147256562
Megabyte
2006-05-10 14:22
2006.06.11
Ну кто так проектирует БД...





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский