Jump to content

PHP: Difference between revisions

181 bytes removed ,  20 April
no edit summary
mNo edit summary
No edit summary
 
(One intermediate revision by one other user not shown)
Line 20: Line 20:
* Type this PHP code into the file
* Type this PHP code into the file


#!/usr/local/bin/php
  <?php
  <?php
     echo "Hello World!";
     echo "Hello World!";
  ?>
  ?>
Notice the use of the hashbang (or shebang - yes, make all the jokes you want), which must be present at the top of every PHP file.
#!/usr/local/bin/php


* Save and exit (CTRL + O, CTRL + X)
* Save and exit (CTRL + O, CTRL + X)
Line 74: Line 68:
$example1 now contains "altered example" and the previous contents are gone.
$example1 now contains "altered example" and the previous contents are gone.


[[Category:Helpdesk]]
[[Category:Archive]]