- Check the PHP Help Pages.
- Apply for a UND Engineering Linux Account.
- Use VPN (Virtual Private Network) to connect to the UND networks.
You may not need to do this if you are on campus.
- Log in to the Linux server
undcemcs02.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:
shell> chmod 711 ~/../userid
shell> chmod 711 ~userid/public_html
shell> 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
shell> chmod 755 ~userid/public_html/test.php
shell> 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://shell.und.edu/~user.id/test.php