Tietokoneiden näyttöjä, joissa näkyy kuvaa automaatiolaboratorion laitteistosta. Monitoreiden takana näkyy sama laitteisto kuin kuvissa.

timohei.net / My Courses / ???/ T862203 FLOSS Projects 3 cu /
How to create a php file

First, open an ssh session to students.oamk.fi

Then:

  1. Create a directory called public_html to your home directory:
    mkdir public_html
  2. Change the permissions for the newly created directory to allow for web server to access it:
    chmod 755 public_html
  3. Check that new directory shows up and has correct permissions:
    rhea (t8heti09)4% ls -l
    drwxr-xr-x  19 timohei      1024 Nov 26 15:14 public_html/
    rhea (t8heti09)5%
  4. Go into the directory:
    cd public_html
  5. Create a new php file using pico editor:
    pico first.php
  6. Edit the file:

    Click the image to enlarge it
  7. Save the file by pressing <CTRL>-X:
    Click the image to enlarge it
  8. Press y to save
  9. Accept the file name by pressing Enter
  10. Now you are back to the shell:
    Click the image to enlarge it
  11. Change the permissions for the newly created file to allow for web server to access it:
    chmod 644 first.php
  12. Open a web browser and type in address http://www.students.oamk.fi/~your_username/first.php?x=First&second=The%20Other
  13. Your php script will print out the following:
    Click the image to enlarge it
Updated 15.11.2020

<<  Previous Page
(4) Selected Projects
Sivu 5/8Next Page >>
(6) How to unpack a project file
© Timo Heikkinen | timo piste heikkinen at oamk piste fi