Prev | Current Page 374 | Next

W. Jason Gilmore

"Beginning PHP and MySQL: From Novice to Professional"

For instance, by default, PHP??™s mail() function
relies on the sendmail program (or a sendmail wrapper), but sendmail isn??™t
available on Windows. To account for this incompatibility, it??™s possible to alternatively
specify the address of an SMTP server and send mail through it. However,
how would your application be able to determine which method is available?
The Mail package resolves this dilemma by offering a unified interface for sending
mail that doesn??™t involve modifying PHP??™s configuration. It supports three
different back ends for sending e-mail from a PHP application (PHP??™s mail()
function, sendmail, and an SMTP server) and includes a method for validating
e-mail address syntax. Using a simple application configuration file or Web-based
preferences form, users can specify the methodology that best suits their needs.
??? MDB2: The MDB2 package provides an object-oriented query API for abstracting
communication with the database layer. This affords you the convenience of
transparently migrating applications from one database to another, potentially
as easily as modifying a single line of code. At present there are eight supported
databases, including FrontBase, InterBase, Microsoft SQL Server, MySQL, MySQLi,
Oracle 7/8/9/XE, PostgreSQL, and SQLite. Because the MDB2 project is a merge
of two previously existing projects, namely DB and Metabase, and DB has support
for dBase, Informix, MiniSQL, ODBC, and Sybase, one would imagine support
for these databases will soon be added to MDB2, although at the time of writing
nothing had been announced.


Pages:
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386