- Check the PHP Help Pages.
- Apply for a UND Engineering Linux Account.
- Log in to the Linux Server:
undcemcs03.und.edu
.
- Create a PHP Script such as
~/public_html/test.php
.
- Open the PHP Script.
Open the paths to the PHP scripts to let the browsers access them by using the command chmod
, for example:
undcemcs02> chmod 711 ~/../userid
undcemcs02> chmod 711 ~userid/public_html
undcemcs02> ls -all ~userid/public_html/
total 104
drwxr-xr-x 2 userid cslinux 4096 Jan 5 2017 ./
drwxr-xr-x 67 userid cslinux 4096 Mar 13 2016 ../
-rw-r--r-- 1 userid cslinux 4854 Nov 20 2014 a.out
-rw-r--r-- 1 userid cslinux 5977 Jan 5 2017 index.html
-rwx------ 1 userid cslinux 227 Nov 20 2016 test.php
undcemcs02> chmod 755 ~userid/public_html/test.php
undcemcs02> ls -all ~userid/public_html/
total 104
drwxr-xr-x 2 userid cslinux 4096 Jan 5 2017 ./
drwxr-xr-x 67 userid cslinux 4096 Mar 13 2016 ../
-rw-r--r-- 1 userid cslinux 4854 Nov 20 2014 a.out
-rw-r--r-- 1 userid cslinux 5977 Jan 5 2017 index.html
-rwxr-xr-x 1 userid cslinux 227 Nov 20 2016 test.php
†Note that the newest system MAY not require this step because the one executes the script may be the owner himself or herself:
- View the Execution Results from the PHP Script.
You can then check the execution results of your PHP scripts on the browser.
However, you are not able to view the PHP source on the browsers because PHP is a server-side language.
For example, the following HTML page will call PHP script ~/public_html/test.php,
the result is located at:
http://undcemcs03.und.edu/~user.id/test.php