首页 > Web服务器 > [Original]虚拟主机在线解压文件的实现

[Original]虚拟主机在线解压文件的实现

2008年9月22日 发表评论 阅读评论

用过虚拟主机的用户应该都有遇到这样的问题,利用CuteFTP等工具上传整站,等待的时间是多么煎熬。为何不打包整站,在服务端直接解压呢?

大部分虚机是没有该功能的,我们可以透过Http Server对PHP的支持,利用PHP来执行Shell Command。(前提,PHP不能以SafeMode运行)

·实现过程

1.下载PHPShell http://phpshell.sourceforge.net/

2.解压上传到服务器,修改文件夹读写权限为755,修改phpshell.php的读写属性为600,修改config.php,假如用户名和密码,如

[users]

; The default configuration has no users defined, you have to add your own
; (choose good passwords!). Add uses as simple ‘username = “password”‘ lines.
; Please quote your password using double-quotes as shown. The semi-colon ‘:’
; is a reserved character, so do *not* use that in your passwords.
;
; For improved security it is *strongly suggested* that you the pwhash.php
; script to generate a hashed password and store that instead of the normal
; clear text password. Keeping your passwords in hashed form ensures that
; they cannot be found, even if this file is disclosed. The passwords are
; still visible in clear text during the login, though. Please follow the
; instructions given in pwhash.php.

test=”test”

;test为用户ID,”test”为Password
要更安全,请使用pwhash.php

3.用类似的URL .com/phpshell/phpshell.php”>http://www.<yourname>.com/phpshell/phpshell.php访问

snapshot-phpshell.png

到此,就可以使用系统zip tools和tar tools工具了,和真实的终端没什么两样了。

分类: Web服务器 标签:
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.