This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
uphp:uphp_language_basics [2019/07/22 06:20] admin |
uphp:uphp_language_basics [2019/07/22 06:52] admin |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======uPHP | + | ======uPHP |
- | Blockly is a visual programming editor developed by Google. | + | The following sections describe how to work with uPHP scripts. |
- | Visual | + | =====uPHP Tags===== |
- | {{: | + | When Wattmon parses a file, it looks for opening and closing tags, which are ''< |
- | =====Programmer Reference===== | + | <code php> |
+ | Some text | ||
+ | <? | ||
+ | print(‘hello, | ||
+ | ?> | ||
+ | Some more text | ||
+ | </ | ||
- | * [[functions|uPHP Function Reference]] - The entire function list (advanced) | + | In addition, you can integrate multiple code blocks within a page, even if it is within a uPHP code block. |
- | * [[uPHP Special Variables]] | + | <code php> |
+ | <? | ||
+ | If ($mycondition > 5) { | ||
+ | ?> This will only be output if my condition > 5 <? | ||
+ | } else { | ||
+ | ?> This will be output if the first condition is not true. <? | ||
+ | } | ||
+ | ?> | ||
+ | </ | ||
+ | |||
+ | =====Instruction Separation===== | ||
+ | |||
+ | As in C and PHP, uPHP requires instructions to be terminated with a semicolon at the end of each statement. The closing tag of a block of uPHP code automatically implies a semicolon; you do not need to have a semicolon terminating the last line of a uPHP block. The closing tag for the block will include the immediately trailing newline if one is present. | ||
+ | |||
+ | |||
+ | =====Comments===== | ||
+ | |||
+ | uPHP supports ' | ||
+ | |||
+ | <code php> | ||
+ | <? | ||
+ | // comment 1 | ||
+ | $x=1; | ||
+ | # comment2 | ||
+ | $x=2; | ||
+ | print($x); | ||
+ | /* comment 3 */ | ||
+ | $x=3; | ||
+ | print($x); | ||
+ | ?> | ||
+ | </ | ||
+ | |||
+ | The " | ||
+ | |||
+ | ' | ||
+ | |||
+ | <code php> | ||
+ | <? | ||
+ | /* | ||
+ | echo ' | ||
+ | echo 'Print this also'; | ||
+ | */ | ||
+ | ?> | ||
+ | </ | ||
+ | |||
+ | =====Programmer Reference===== | ||
+ | * [[.functions: | ||
+ | * [[uPHP Special Variables]] | ||