Prev | Current Page 371 | Next

W. Jason Gilmore

"Beginning PHP and MySQL: From Novice to Professional"

Its prototype follows:
string shell_exec(string command)
Reconsidering the preceding example, this time we??™ll use the shell_exec() function
instead of backticks:
$result = shell_exec("date");
printf("

The server timestamp is: %s

", $result);
?>
Summary
Although you can certainly go a very long way using solely PHP to build interesting
and powerful Web applications, such capabilities are greatly expanded when functionality
is integrated with the underlying platform and other technologies. As applied to
this chapter, these technologies include the underlying operating and file systems.
You??™ll see this theme repeatedly throughout the remainder of this book, as PHP??™s ability
to interface with a wide variety of technologies such as LDAP, SOAP, and Web Services
is introduced.
In the next chapter, you??™ll be introduced to the PHP Extension and Application
Repository (PEAR) and the online community repository for distributing and
sharing code.
309
?–  ?–  ?– 
C H A P T E R 1 1
PEAR
Good programmers write solid code, while great programmers reuse the code of
good programmers. For PHP programmers, PEAR, the acronym for PHP Extension
and Application Repository, is one of the most effective means for finding and reusing
solid PHP code. Inspired by Perl??™s wildly popular CPAN (Comprehensive Perl Archive
Network), the PEAR project was started in 1999 by noted PHP developer Stig Bakken,
with the first stable release bundled with PHP version 4.


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