powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / PHP, Perl, Python [игнор отключен] [закрыт для гостей] / Браузер предлагает сохранить скрипт??? почему???
1 сообщений из 1, страница 1 из 1
Браузер предлагает сохранить скрипт??? почему???
    #33569303
remixxx@
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Есть скрипт состоит из 2-х частей:
1) получение данных с формы и запись в базу
2) отправка подтверждения на мыло
Без второй части скрипт пашет на ура, если со второй, то браузер предлагает его сохранить!!!
Почему?
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
if (!$result) {
    echo "error!";
        } else {
        $userid = mysql_insert_id();

        include('class.smtp.inc');  // mail class
 //      header('Content-Type: text/plain');
        $params['host'] = 'smtp.bk.ru';                                // The smtp server host/ip
        $params['port'] =  25 ;                                                // The smtp server port
        $params['helo'] = 'www.pochta.xx;                        // What to use when sending the helo command. Typically, your domain/hostname
        $params['auth'] = TRUE;                                                // Whether to use basic authentication or not
        $params['user'] = 'xxxxxxxxxxx@xxx.ru';                                // Username for authentication
        $params['pass'] = 'xxxxxxxxx';                                // Password for authentication


        //$send_params['recipients']        = array('$email');                                                        // The recipients (can be multiple)
        $send_params['headers']                = array(
                                                                                'From: "admin" <xxxx@xx.ru>;',        // Headers
                                                                                'To: $email', 'Subject: bla bla bla'
                                                                           );
        $send_params['from']  = 'xxxx@xxx.ru';                                                                        // This is used as in the MAIL FROM: cmd
                                                                                                                                                                                // It should end up as the Return-Path: header
        $send_params['body']  = "ляляля,

                                $site_path/activate.php?id=$userid&code=$db_password

                                $site_path/login.php

                                логин: $username
                                пароль: $password

                               ляляля!";                                                                                // The body of the email

        if(is_object($smtp = smtp::connect($params)) AND $smtp->send($send_params)){
                echo 'отправили!'."\r\n\r\n";

                // Any recipients that failed (relaying denied for example) will be logged in the errors variable.
                print_r($smtp->errors);

        }else{
                echo ля ляля!'."\r\n\r\n";

                // The reason for failure should be in the errors variable
                print_r($smtp->errors);
        }
}

?>
...
Рейтинг: 0 / 0
1 сообщений из 1, страница 1 из 1
Форумы / PHP, Perl, Python [игнор отключен] [закрыт для гостей] / Браузер предлагает сохранить скрипт??? почему???
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]