BzikOS
7.10.2002, 11:20:00
Jaka jest róznica między include, include_once, require, require_once?
Wiem tyle, że include to funkcja php, a require to kostrukcja językowa i że require nie zwraca wartości, ale prosiłbym o jakiś przykład praktycznego wykorzystania obu funkcji. Do czego stosować include, a do czego require (no i te _once).
maggot
7.10.2002, 11:49:43
The require() statement includes and evaluates the specific file.
dolacza i wykonuje podany plik
require() and include() are identical in every way except how they handle failure. include() produces a Warning while require() results in a Fatal Error.
czyli jesli bedzie blad przy include to wyrzuci blad i skrypt bedzie sie wykonywal dalej, jesli blad bedzie przy require to wyrzuci blad i zatrzyma skrypt
The include_once() statement includes and evaluates the specified file during the execution of the script. This is a behavior similar to the include() statement, with the only difference being that if the code from a file has already been included, it will not be included again. As the name suggests, it will be included just once.
BzikOS
9.10.2002, 08:19:42
Aaaaaha. I wszystko jasne.
Dzięki