Archive for category Programming
[php] Installing addtional modules separately
Posted by HanaDaddy in Programming on August 24th, 2006
Please refer to README.SELF-CONTAINED-EXTENSIONS from the original source distribution
—-from the readme file—-
Just to show you how easy it is to create a self-contained
extension, we will convert an embedded extension into a
self-contained one. Install PHP and execute the following
commands.
$ mkdir /tmp/newext
$ cd /tmp/newext
You now have an empty directory. We will copy the files from
the mysql extension:
$ cp -rp php-4.0.X/ext/mysql/* .
It is time to finish the module. Run:
$ phpize
You can now ship the contents of the directory – the extension
can live completely on its own.
The user instructions boil down to
$ ./configure \
[--with-php-config=/path/to/php-config] \
[--with-mysql=MYSQL-DIR]
$ make install
The MySQL module will either use the embedded MySQL client
library or the MySQL installation in MYSQL-DIR.
[php] Good things to know about global variable in PHP
Posted by HanaDaddy in Programming on August 24th, 2006
From 4.1.0 (or 4.2.0)
Default register_globals in php.ini is off
This disables automatic forms input name to PHP vars function
(Eg.<input name=simpletext > => in php the input value is available as $simpletext with register_globals on )
Therefore, you need to access below Globals to access them
Also, short_open_tags is off
This disables <? ?> php tag. so you need to use <?php ?>.
Read the rest of this entry »
Recent Comments