社交网络 PHP/MySQL 结构
我想创建一个社交媒体网站。我现在只是在计划,我想首先通过用户名/密码组合登录用户,检查 mysql 数据库并查看它们是否存在。这很简单。但我要问的是,就像 Facebook 一样,对于“Bio”页面,您会添加“从 user_id = $user_id 的朋友中选择”之类的内容吗?那么我是否在整个页面上使用相同的 user_id 来选择评论、联系信息、朋友、图片、喜欢、不喜欢?这是正确的还是这种糟糕的应用程序结构?
I want to create a social media site. I'm just planning it out at the moment, i'm thinking first to log the user in by username/password combo, checking against a mysql db and seeing if they exist. Thats simple enough. But i'm asking is, like Facebook, for a "Bio" page, would you put stuff like "select from friends where user_id = $user_id", that sort of thing? So do i use the same user_id over the whole page for selecting comments, contact info, friends, pictures, likes, dislikes? Is this right or is this poor application structure?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

发布评论
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我想你还有很长的路要走。
请不要误解这一点,但您似乎缺乏手动构建这样一个平台所需的技能。
如果您有能力构建一个社交网站,您就会对身份验证系统有深入的了解,但您似乎缺乏这一点。
我建议您使用专门为社交互动(例如 Facebook)构建的自定义开源框架。
这里有一些可以帮助您入门的
I think you ahve a long way to go.
Please dont take this the wrong way but you seem to lack the required skills to manually build such a platform.
If you had it in you to build a social network site you would understand authentications systems down to a tee, but you seem to lack that.
What i would suggest is that you use a custom open source framework specifically built for social interactions such as facebook.
Here a few to get you started