为每个用户创建个人页面,PHP [英] Create personal page for every user, PHP
问题描述
我想做的是在每个用户在我的页面上注册时为他们创建一个网页.
What I want to do is to create a web page for every user when they signup on my page.
例如:www.someweb.com/username,这将是他们的网页.
For Example: www.someweb.com/username, and this will be their webpage.
我知道这可以通过 mkdir()
和其他相关函数轻松完成,但问题是我的根文件夹不是 chmod 777
而我没有出于安全原因,不想 chmod 777
这个根文件夹.
I know that this can be done easily with mkdir()
and other related functions, but the problem is that my root folder is not chmod 777
and I don't want to chmod 777
this root folder because of security reasons.
当用户在我的网页上注册时,最好的方法是什么.
What is the best way to do this when a user registers on my web page.
推荐答案
您不必为每个用户创建物理目录,而是使用 URL 重写.看看这个来源:
You don't make physical directories for each user, you use URL rewriting. Take a look at this source:
这篇关于为每个用户创建个人页面,PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!