This is a test site. Any changes will be lost!

PHP: Difference between revisions

From MoodleDocs
No edit summary
 
Change HTML line to 'in moodle
 
(10 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<?php
PHP is the scripting language in which Moodle is developed. PHP does not stand alone, it is tightly integrated with a suitable HTTP Server. Most people use the [[Apache]] HTTP Server for this purpose although a number of others are supported.
if (!function_exists('geshi_highlight')) {
/**
    * Easy way to highlight stuff. Behaves just like highlight_string
    *
    * @param string The code to highlight
    * @param string The language to highlight the code in
    * @param string The path to the language files. You can leave this blank if you need
    *              as from version 1.0.7 the path should be automatically detected
    * @param boolean Whether to return the result or to echo
    * @return string The code highlighted (if $return is true)
    * @since 1.0.2
    */
function geshi_highlight ($string, $language, $path, $return = false)
{
$geshi = new GeSHi($string, $language, $path);
$geshi->set_header_type(GESHI_HEADER_NONE);
if ($return) {
return '<code>' . $geshi->parse_code() . '</code>';
}
echo '<code>' . $geshi->parse_code() . '</code>';
if ($geshi->error()) {
return false;
}
return true;
}
}


?>
PHP describes itself as "a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into [[HTML in Moodle|HTML]]."
 
 
== Installation ==
 
Usually PHP is installed alongside [[Apache]] and [[MySQL]] in a combination known as AMP, see [[Installing AMP]] for details.
 
== Minimum version requirements ==
 
The minimum version of PHP required for Moodle is listed in the [[Installing_Moodle#Requirements|requirements section of the installation instructions]]
 
== See also ==
 
* [http://www.php.net/ The PHP home page]
* [http://en.wikipedia.org/wiki/PHP Wikipedia article on PHP]
 
[[Category:Administrator]]
[[Category:Developer]]
 
[[ja:PHP]]
[[pl:PHP]]

Latest revision as of 21:42, 19 October 2008

PHP is the scripting language in which Moodle is developed. PHP does not stand alone, it is tightly integrated with a suitable HTTP Server. Most people use the Apache HTTP Server for this purpose although a number of others are supported.

PHP describes itself as "a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML."


Installation

Usually PHP is installed alongside Apache and MySQL in a combination known as AMP, see Installing AMP for details.

Minimum version requirements

The minimum version of PHP required for Moodle is listed in the requirements section of the installation instructions


See also