PHP 5 Power Programming

   »    Book by Andi Gutmans, Stig Sæther Bakken, and Derick Rethans

Computer Education, Training & Tutorial Resources - ComputerEducationWorld.com
Home » Free Computer Books » PHP » PHP 5 Power Programming »

The INI file (php.ini) implementation allows PHP extensions to register and
listen to their own custom INI entries. If these INI entries are assigned a
value either by php.ini, Apache’s .htaccess, or other configuration methods,
the registered INI variable will always be updated with the correct value. This
whole INI framework has many different options and allows for a lot of flexi-
bility. We cover the basics (which gives you a good start) and, with the help of
the other material in this chapter, allows you to do most of what you’ll need for
your day-to-day job. (more…)


• • •
 

You might want to use global C variables in your extension, either for your
own internal use or for receiving php.ini values of your extension’s registered
INI directives (INI is discussed in the next section). As PHP is designed to run
in multi-threaded environments, you shouldn’t define global variables on your
own. PHP supplies a mechanism that creates global variables for you, which
can be used both in threaded and non-threaded environments. You should
always use this mechanism and not define your own global variables. These
global variables are then accessed via a macro and used just as if they are reg-
ular global variables. (more…)


• • •
 

You are now ready to write a test script to
check that the extension works. Here’s a sample script that opens a file
test.txt, prints its contents to the standard output, and creates a copy of the
file as test.txt.new: (more…)


• • •
 

All macros have three forms:
one that accepts zvals, another one for zval *s, and finally one for zval **s.
The difference in their names is that the first has no suffix, the zval * has a
suffix of _P (as in one pointer), and the latter, zval **, has a suffix of _PP (two
pointers). (more…)


• • •
 



captcha PHP Script Free PHP captcha script free php
Website Design by WebWalas.com