documentation:php
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
documentation:php [2010/05/20 10:18] – triley2 | documentation:php [2010/05/20 10:19] (current) – triley2 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <WRAP left 40%> | ||
+ | ~~TOC~~ | ||
+ | </ | ||
+ | // | ||
+ | // | ||
+ | <WRAP centeralign 100% bigger> | ||
+ | <WRAP bigger fgred> | ||
+ | <WRAP muchbigger> | ||
+ | Hyper Text Preprocessor | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | PHP (Personal Home Page) is a scripting language used to produce dynamic web pages. It is put into html pages to give them more functionality. There is no compiling necessary, the web server interprets the code at run time. | ||
+ | |||
+ | ===== First Web Page with PHP ===== | ||
+ | <code html> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | <?php | ||
+ | echo "This is a hello world page!" | ||
+ | ?> | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===== Basic Commands ===== | ||
+ | |||
+ | ==Variables and Comments== | ||
+ | |||
+ | *$ - variables (do not need to be declared) | ||
+ | */ / - comments | ||
+ | |||
+ | ==Common Functions== | ||
+ | |||
+ | * if () - decision | ||
+ | *else () - alternate to if | ||
+ | *eval () - evaluate text string | ||
+ | *Array () - creat an array | ||
+ | *time () - outputs time | ||
+ | *date () - formats time output | ||
+ | *echo () - output to page | ||
+ | *include () - include external files | ||
+ | *system () - call the system to execute a command | ||
+ | *shell_exec - call the system to execute a command | ||
+ | ==Regular Expressions== | ||
+ | */ - escape character | ||
+ | *^ - start of string | ||
+ | *$ - end of string | ||
+ | *. - and single character | ||
+ | *a? - 0 or one of a | ||
+ | *a* - 0 or more of a | ||
+ | *a+ - 1 or more of a | ||
+ | *(y|z) - y or z | ||
+ | *(...) - group selection | ||
+ | *[xyz] - range | ||
+ | *[^xyz] - ont in range | ||
+ | |||
+ | ===== links ===== | ||
+ | *www.w3schools.com | ||