在虚拟主机上创建 Symbol Link - ○白子○ 的Blog

在虚拟主机上创建 Symbol Link

[ 2009-09-15 01:31:29 | Author: seaboat ]
Font Size: Large | Medium | Small
便宜的虚拟主机不提供 Shell,因此需要用命令实现的功能不大容易实现。
做网站经常要用 ln 命令创建链接,而要在一般的虚拟主机上就不得不想其他办法了。
不用命令的情况下,用程序倒也能解决一些问题,比如这个建立链接的目标,可用以下 PHP 程序实现:
<?php
$appLib = realpath(dirname(__FILE__) . '/../library');
$zfLib = realpath(dirname(__FILE__) . '/../../ZF');
symlink("$appLib/Zend", "$zfLib/Zend");
经测试,链接正常建立,然而不能正常工作,只能说虚拟主机的自我保护功能做得还不错。
[Last Modified By seaboat, at 2009-09-15 01:33:36]
Comments Feed Comments Feed: http://www6.webng.com/seaboat/feed.asp?q=comment&id=762

There is no comment on this article.

Post Comment
Smilies
[smile] [confused] [cool] [cry]
[eek] [angry] [wink] [sweat]
[lol] [stun] [razz] [redface]
[rolleyes] [sad] [yes] [no]
[heart] [star] [music] [idea]
Enable UBB Codes
Auto Convert URL
Show Smilies
Hidden Comment
Username:   Password: