PHP

From LQWiki
Jump to: navigation, search

PHP Hypertext Preprocessor is a tool for making dynamic websites with embedded code in HTML-pages. It is widely used and has many useful features like good database connectivity. The PHP tips section has useful information for php coders.

Simple PHP code embedded in HTML.

<html>
<body>

<?php
echo "Hello World!";
?>
</body>
</html>

Critics of PHP often point out its lack of namespaces, lack of references and no effective mean of creating complex data structures and lack of a standardized database interface.

Configuring PHP

Configuring PHP is done in the file php.ini. Its location depends on distribution and version. For example for SUSE Linux 11.2, there is one /etc/php5/cli/php.ini for the command line interface and a /etc/php5/apache2/php.ini for the web Server.

See also