首頁  >  文章  >  php教程  >  linux下使用Apache+php實作留言板功能的網站

linux下使用Apache+php實作留言板功能的網站

高洛峰
高洛峰原創
2016-10-12 16:28:271243瀏覽

一.首先我們的linux伺服器上要安裝Apache和php  php的安裝方法和Apache方法如同一轍      

請參考:http://www.cnblogs.com/dagege/p/5949620.html關閉防火牆服務,關閉selinux 

請參考:http://www.cnblogs.com/dagege/p/5947251.html

三.我們透過FTP服務或使用rz指令將檔案放到Apache的根目錄下/ var/www/html

範例檔下載:http://files.cnblogs.com/files/dagege/liuyanban.zip

[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服務

[root@localhost html]# systemctl start httpd.service

五.成果

linux下使用Apache+php實作留言板功能的網站五。

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn