Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

相对路径的可行性 #41

Open
netputer opened this issue Mar 11, 2013 · 6 comments
Open

相对路径的可行性 #41

netputer opened this issue Mar 11, 2013 · 6 comments

Comments

@netputer
Copy link
Owner

今天在修复 #39 错误时,发现目前已有的函数可以做到准确获得相对路径。而基于相对路径的地址,不管是链接还是 header 跳转,都免去了判断协议的需要。

b503e44

@shadowglen
Copy link
Contributor

你忘了 #36 错误么...

@netputer
Copy link
Owner Author

那个问题是应该路径不是 / 开头的。

我也试过了,可以在 URL Rewrite 的情况下正常获取程序根目录。

@shadowglen
Copy link
Contributor

我考虑的是 如果npt装在二级目录下的话 相对路径可以正常工作么?

On Mar 11, 2013, at 11:03 PM, NetPuter [email protected] wrote:

那个问题是应该路径不是 / 开头的。

我也试过了,可以在 URL Rewrite 的情况下正常获取程序根目录。


Reply to this email directly or view it on GitHub.

@netputer
Copy link
Owner Author

只要相对路径是以 / 开头就可以。

比如 xxx.com/np/tui/index.php ,那么相对路径为 /np/tui/ 即可正常工作。

On Mon, Mar 11, 2013 at 11:06 PM, Shadowglen Elf
[email protected]:

我考虑的是 如果npt装在二级目录下的话 相对路径可以正常工作么?

On Mar 11, 2013, at 11:03 PM, NetPuter [email protected] wrote:

那个问题是应该路径不是 / 开头的。

我也试过了,可以在 URL Rewrite 的情况下正常获取程序根目录。


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/41#issuecomment-14718207
.

Best Regards,
NetPuter Lin » http://netputer.me/

@shadowglen
Copy link
Contributor

嗯 这样来看的确可以用相对路径 还可以支持多域名

On Mar 11, 2013, at 11:07 PM, NetPuter [email protected] wrote:

只要相对路径是以 / 开头就可以。

比如 xxx.com/np/tui/index.php ,那么相对路径为 /np/tui/ 即可正常工作。

On Mon, Mar 11, 2013 at 11:06 PM, Shadowglen Elf
[email protected]:

我考虑的是 如果npt装在二级目录下的话 相对路径可以正常工作么?

On Mar 11, 2013, at 11:03 PM, NetPuter [email protected] wrote:

那个问题是应该路径不是 / 开头的。

我也试过了,可以在 URL Rewrite 的情况下正常获取程序根目录。


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/41#issuecomment-14718207
.

Best Regards,
NetPuter Lin » http://netputer.me/

Reply to this email directly or view it on GitHub.

@netputer
Copy link
Owner Author

是的,目录名是每次判断得到的。

2013/3/11 Shadowglen Elf [email protected]

嗯 这样来看的确可以用相对路径 还可以支持多域名

On Mar 11, 2013, at 11:07 PM, NetPuter [email protected] wrote:

只要相对路径是以 / 开头就可以。

比如 xxx.com/np/tui/index.php ,那么相对路径为 /np/tui/ 即可正常工作。

On Mon, Mar 11, 2013 at 11:06 PM, Shadowglen Elf
[email protected]:

我考虑的是 如果npt装在二级目录下的话 相对路径可以正常工作么?

On Mar 11, 2013, at 11:03 PM, NetPuter [email protected]
wrote:

那个问题是应该路径不是 / 开头的。

我也试过了,可以在 URL Rewrite 的情况下正常获取程序根目录。


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub<
https://github.com/netputer/netputweets/issues/41#issuecomment-14718207>
.

Best Regards,
NetPuter Lin » http://netputer.me/

Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/41#issuecomment-14718398
.

Best Regards,
NetPuter Lin » http://netputer.me/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants