Ребят, всем привет.
Есть такой вопрос, я в принципе по большей части занимаюсь ip телефонией. В данный момент настраиваю факс на yate. Кстати, могу помочь в этом вопросе.
Весь процесс разделил на 2 этапа, принятие .tif файла на хард, затем скриптом из crontab раз в N время
слать этот файл на e-mail. Скрипты писал не я, лежали в нете. Проблема вот в чем:
1. На этапе тестирования, подсовывая файл скрипту в папку(тестовый файл называется 1_022985493_022766520.TIF
Насколько я понял скрипт, он берет номер телефона и e-mail из базы данных. Вот содержание таблички users:
mysql> select * from users;
+----+-----------+----------+--------+------+----------+----------+-----------+----------------------+------+
| id | username | password | enable | mac | contract | vmstatus | faxstatus | fax2email | city |
+----+-----------+----------+--------+------+----------+----------+-----------+----------------------+------+
| 1 | 022766520 | NULL | NULL | NULL | NULL | NULL | 1 | kennyg1988@gmail.com | NULL |
+----+-----------+----------+--------+------+----------+----------+-----------+----------------------+------+
1 row in set (0.00 sec)
При выполнении скрипта получаю следующее:
./fax2email.php
PHP Notice: Undefined offset: 1 in /home/fax2email.php on line 19
Notice: Undefined offset: 1 in /home/fax2email.php on line 19
PHP Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in /home/fax2email.php on line 31
Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in /home/fax2email.php on line 31
PHP Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/fax2email.php on line 32
Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/fax2email.php on line 32
PHP Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in /home/fax2email.php on line 33
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in /home/fax2email.php on line 33
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/fax2email.php on line 35
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/fax2email.php on line 35
Еще вопрос состоит в названии файла, насколько я понял часть скрипта: