为每个用户创建个人页面,PHP [英] Create personal page for every user, PHP

查看:38
本文介绍了为每个用户创建个人页面,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:

HTML 源代码:HTML 教程,URL 重写

这篇关于为每个用户创建个人页面,PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆