PHP scripting tag always starts with <?php and ends with ?>. PHP scripting tag can be use anywhere in the document.
There are four sets of tags which can be used to denote blocks of PHP code. Of these, only two (<?php. . .?> and <script language=”php”>. . .</script>) are always available; the others can be turned on or off from the php.ini configuration file. While the short-form tags and ASP-style tags may be convenient, they are not as portable as the longer versions. Also, if you intend to embed PHP code in XML or XHTML, you will need to use the <?php. . .?> form to conform to the XML.
To activate recognition for short tags, you must make sure that the short_open_tag switch is set to On in php.ini:[Read More...]
Thursday, May 6, 2010
So you have a file, and in that file you have some HTML and some PHP code. This is how it all works, assuming a PHP document with an extension of .php.
GetBlogs Blog Directory
- The Web browser requests a document with a .php extension.
- The Web server says, “Hey! Someone wants a PHP file. Something else needs to deal with it,” and sends the request on to the PHP parser.
- The PHP parser finds the requested file and scans it for PHP code.
- When the PHP parser finds PHP code, it executes that code and places the resulting output (if any) into the place in the file formerly occupied by the code.
- This new output file is sent back to the Web server.
- The Web server sends it along to the Web browser.
- The Web browser displays the output. [Read More...]
GetBlogs Blog Directory
Saturday, May 1, 2010
- Web server software. Most sites use Apache as the web server software. Moodle should work fine under any web server that supports PHP, such as IIS on Windows platforms.
- PHP scripting language. (Please note that there have been issues installing Moodle with PHP-Accelerator). There are currently two versions (or branches) of PHP available: PHP4 and PHP5. See the PHP Moodle version requirements here PHP settings by Moodle version. [Read More...]
Friday, April 30, 2010
The normal process a Web server goes through to deliver a page to a browser is as follows. It all begins when a browser makes a request for a Web page. Based on the URL, the browser resolves the address of the Web server, identifies the page it would like, and gives any other information the Web server may need. Some of this information is about the browser itself, like its name (Mozilla), its version (4.08), or the operating system (Linux). Other information given the Web server could include text the user typed into form fields. [ read more...]