Hello PHP
Created Tuesday 29 May 2018
I'd like to ensure that everyone is ready to go next Monday, so we will do a quick "Hello PHP" assignment.
In short, when I visit your main LIS link (e.g. YOURID.lis536x.cci.fsu.edu) I should see a short greeting from you and a VERY LONG chunk of info about your PHP install. Luckily, the latter is accomplished with one very short php function which you have seen before, which is phpinfo();
The procedure for this should be simple:
- if you have an index.html file that you would like to keep, back it up and/or rename it.
- in your main html folder, create a new file called index.php (it MUST end in php or this will not work)
- Create a mostly blank html file (whose name ends in php regardless....)
- Within your body tags, do something like the following:
<body> <h1> Hey this is John, and below is a bunch of stuff I'm probably not going to read! </h1> See you in class. <?php phpinfo(); ?> </body>
- Save. When you visit your page, you should see your greeting and the result of the phpinfo function.
Some other notes:
- Again, I'll be using Lubuntu. Have your install ready if you'd like to follow along.
- Additionally, for now I will be using "jedit." Get this installed on your lubuntu install, or on your regular OS
- To streamline things for yourself, either review "transferring files" with Lubuntu, or develop a system that allows you to quickly upload to your lis server.