Php: Difference between revisions
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
* LAMP | * LAMP | ||
* error logs /cat /var/log/apache2/error.log / run file | * error logs /cat /var/log/apache2/error.log / run file | ||
====Hello World==== | |||
* mixing | |||
<source lang="php"> | <source lang="php"> | ||
Line 24: | Line 25: | ||
</source> | </source> | ||
==== Syntax ==== | |||
<source lang="php"> | <source lang="php"> | ||
function myFunction() { //declares a function, this is named myFunction | function myFunction() { //declares a function, this is named myFunction |
Revision as of 21:43, 21 April 2013
- Server side programming language
- frameworks
- php.net
- LAMP
- error logs /cat /var/log/apache2/error.log / run file
Hello World
- mixing
<!DOCTYPE html>
<meta charset=utf-8>
<title>PHP Test</title>
<?php
echo 'Hello World';
?>
Syntax
function myFunction() { //declares a function, this is named myFunction
return 'John Doe'; //returns the value 'John Doe'
}
echo 'My name is ' . myFunction() . '!'; //outputs the text concatenated with the return value of myFunction.
//myFunction is called as a result of this syntax.
//The result of the output will be 'My name is John Doe!'