|
|
PHP (angielski akronim rekurencyjny, którego rozwinięcie to PHP Hypertext Preprocessor), pierwotnie nazwany Personal
Home Page - skryptowy język programowania, służący przede wszystkim do tworzenia dynamicznych stron WWW i wykonywany w
tym przypadku po stronie serwera, z możliwością zagnieżdżania w HTML (bądź XHTML). PHP jest podobny w założeniach do
dużo starszego mechanizmu SSI (Server Side Includes), jednak jest w stosunku do SSI nieporównanie bardziej rozbudowany.
Udostępniany jest na zasadach licencji open-source. Jego składnia bazuje na językach C, Java i Perl.
SQL (ang. Structured Query Language) to strukturalny język zapytań używany do tworzenia, modyfikowania baz danych oraz
do umieszczania i pobierania danych z baz danych.
Język SQL jest językiem deklaratywnym. Decyzję o sposobie przechowywania i pobrania danych pozostawia się systemowi
zarządzania bazą danych DBMS.
Jest to język programowania opracowany w latach siedemdziesiątych w firmie IBM. Stał się on standardem w komunikacji z
serwerami relacyjnych baz danych. Wiele współczesnych systemów relacyjnych baz danych używa do komunikacji z
użytkownikiem SQL, dlatego mówi się, że korzystanie z relacyjnych baz danych, to korzystanie z SQL-a.
Apache jest otwartym serwerem HTTP dostępnym dla wielu systemów operacyjnych (m.in. UNIX, GNU/Linux, BSD,
Microsoft Windows). Po angielsku słowo Apache wymawia się epaczi, co brzmi tak samo jak a patchy (server), co było
określeniem tego serwera we wczesnym stadium jego rozwoju w 1995 roku, kiedy był on głównie zbiorem poprawek (patch)
nałożonych na serwer HTTP o nazwie NCSA.
Apache jest najszerzej stosowanym serwerem HTTP w Internecie. W maju 2003 jego udział wśród serwerów wynosił 62%. W
połączeniu z interpreterem języka skryptowego PHP i bazą danych MySQL, Apache stanowi jedno z najczęściej spotykanych
środowisk w firmach oferujących miejsce na serwerach sieciowych.
|
error_log
(PHP 3, PHP 4, PHP 5) error_log -- Send an error message
somewhere
Opisbool error_log ( string
message [, int message_type [, string destination [, string
extra_headers]]] )
Sends an error message to the web server's error log, a
TCP port or to a file.
Parametry
- message
-
The error message that should be logged.
- message_type
-
Says where the error should go. The possible message
types are as follows:
Tabela 1. error_log() log types
| 0 |
message is sent
to PHP's system logger, using the Operating
System's system logging mechanism or a file,
depending on what the error_log
configuration directive is set to. This is the
default option. |
| 1 |
message is sent
by email to the address in the destination parameter. This is
the only message type where the fourth parameter,
extra_headers is
used. |
| 2 |
message is sent
through the PHP debugging connection. This option
is only available if remote
debugging has been enabled. In this case, the
destination
parameter specifies the host name or IP address
and optionally, port number, of the socket
receiving the debug information. This option is
only available in PHP 3. |
| 3 |
message is
appended to the file destination. A newline is not
automatically added to the end of the message string. |
- destination
-
The destination. Its meaning depends on the
message parameter as
described above.
- extra_headers
-
The extra headers. It's used when the message parameter is set to 1. This message type uses the same
internal function as mail()
does.
Zwracane wartości
Zwraca TRUE w przypadku
sukcesu, FALSE w przypadku
porażki.
Przykłady
Przykład 1. error_log() examples
<?php // Send notification through the server log if we can not
// connect to the database. if (!Ora_Logon($username, $password)) {
error_log("Oracle database not available!", 0);
}
// Notify administrator by email if we run out of FOO
if (!($foo = allocate_new_foo())) {
error_log("Big trouble, we're all out of FOOs!", 1,
"operator@example.com");
}
// other ways of calling error_log():
error_log("You messed up!", 2, "127.0.0.1:7000");
error_log("You messed up!", 2, "loghost");
error_log("You messed up!", 3, "/var/tmp/my-errors.log");
?> |
|
|