119
edits
No edit summary |
(Remove legacy information.) |
||
| (7 intermediate revisions by one other user not shown) | |||
| Line 14: | Line 14: | ||
cd ~/public_html | cd ~/public_html | ||
* Create a file called | * Create a file called ''hello.php'' using a text editor. | ||
nano hello.php | nano hello.php | ||
* | * Type this PHP code into the file | ||
<?php | <?php | ||
echo | echo "Hello World!"; | ||
?> | ?> | ||
| Line 44: | Line 43: | ||
<a href="http://www.example.com/links.php">Links</a> - | <a href="http://www.example.com/links.php">Links</a> - | ||
<a href="http://www.example.com/contact.php">Contact Us</a> | <a href="http://www.example.com/contact.php">Contact Us</a> | ||
index.php | index.php | ||
<html><body> | <html><body> | ||
<?php include("menu.php"); ?> | <?php include("menu.php"); ?> | ||
</body></html> | </body></html> | ||
| Line 60: | Line 57: | ||
PHP variables can store any data you wish. They start with a $ sign and contain alphanumerical characters, but must always start with a letter. | PHP variables can store any data you wish. They start with a $ sign and contain alphanumerical characters, but must always start with a letter. | ||
$example1 = | $example1 = "example"; | ||
echo $example1; | echo $example1; | ||
This will output the text | This will output the text "example". | ||
Variables as the name suggest can be altered after they're declared. | Variables as the name suggest can be altered after they're declared. | ||
$example1 = | $example1 = "altered example"; | ||
$example1 now contains | $example1 now contains "altered example" and the previous contents are gone. | ||
[[Category:Helpdesk]] | [[Category:Helpdesk]] | ||