一.首先我們的linux服務器上要安裝Apache和php
php的安裝方法和Apache方法如同一轍
請參考:http://www.jfrwli.cn/article/204095.html
二.關閉防火墻服務,關閉selinux
請參考:http://www.cnblogs.com/dagege/p/5947251.html
三.我們通過FTP服務或使用rz命令將文件放到Apache的根目錄下 /var/www/html
示例文件下載:http://files.cnblogs.com/files/dagege/liuyanban.zip
1
2
3
4
5
6
7
8
9
|
[root@localhost /]# cd / var /www/html/ [root@localhost html]# ls -la 總用量 8 drwxr-xr-x. 3 root root 55 10月 11 22:31 . drwxr-xr-x. 4 root root 31 10月 11 15:40 .. -rw-r--r-- 1 root root 123 10月 11 22:31 index.php -rw-r--r-- 1 root root 3704 9月 19 15:05 juezhen.php drwxr-xr-x 2 root root 6 10月 11 22:30 messages [root@localhost html]# chmod o+w messages/ #給messages目錄設置普通有用戶的寫入權限 |
四.啟動httpd服務
1
|
[root@localhost html]# systemctl start httpd.service |
五.成果
以上所述是小編給大家介紹的linux下使用Apache+php實現留言板功能的網站,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對服務器之家網站的支持!
原文鏈接:http://www.cnblogs.com/dagege/archive/2016/10/11/5951083.html