var_dump($variable); print_r($variable);
http://host/prog.php?variable=valueExample:
mind.php?mind=test093Parsed like this in mind.php:
<html> <?PHP $qs=$_SERVER["QUERY_STRING"]; parse_str ( $qs ); // $mind is now defined as whatever the value was ?> <head> <?PHP print "<title> Mind: $mind </title> \n"; .... |
#!/usr/local/bin/php Whatever is outside PHP is just displayed. <?php // echo PHP_VERSION; print "Name of script = $argv[0] \n"; print "First command-line arg = $argv[1] \n"; print "All command-line args: \n"; print_r($argv); print "\n"; ?> Whatever is outside PHP is just displayed. |
On DCU Linux try:
#!/local1/php5/bin/php