Professional Documents
Culture Documents
UNIT 1-Including Code (Programming PHP)
UNIT 1-Including Code (Programming PHP)
home |
O'Reilly's CD bookshelfs |
FreeBSD | Linux | Cisco |
Cisco Exam
require 'codelib.inc';
mysub( ); // defined in codelib.inc
include 'http://www.example.com/codelib.inc';
// main page
include 'userprefs.inc';
echo "Hello, $user.";
The ability of libraries to see and change your variables can also be
a problem. You have to know every global variable used
by a library
to ensure that you don't accidentally try to use one
of them for your own purposes, thereby overwriting the
library's value and disrupting how it works.
https://docstore.mik.ua/orelly/webprog/php/ch02_06.htm 1/2
7/14/2021 Including Code (Programming PHP)
for ($i=0; $i < 10; $i++) {
include "repeated_element.html";
}
https://docstore.mik.ua/orelly/webprog/php/ch02_06.htm 2/2