Changes

Jump to: navigation, search

OPS335 Lab 6

6 bytes added, 31 July
m
Creating a PHP Script
<ol><li value="2">On your host machine, in the web-browser manually add '''/index.php'''. Notice that in a web browser the ''index.php'' file isn't treated as a default page and the contents don't contain the date, but instead are displaying the text in the php code you entered into the index.php file (refer to above code).</li>
<li>The reason this occurs is that the PHP interpreter hasn't been installed on your vm by default.</li>
<li>Install the '''php ''' package on your vm1 machine, and restart your webserver. NOTE: The php package comes with a working default Apache configuration so you don't need to enable it manually.</li>
<li>Refresh the webpage in your web-browser on your host machine. You should now notice that you see the date instead of the call to the date command. Refresh your webpage several times to see how the time changes. This is simply a "trivial example" of dynamic web content does it does provide a simple demonstration of how scripting languages can be used to create more dynamic webpages.</li>
</ol>
209
edits

Navigation menu