我怎么能创建一个本地邮政系统? [英] How could I create a local post system?

查看:83
本文介绍了我怎么能创建一个本地邮政系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个系统,几乎像Twitters(但更简单),当他们分享内容时会在用户页面上创建一个帖子。



Eg :



用户1帖子

你好!



用户1的个人资料转到:

你好!



用户1帖子

你好再说! />


用户1的个人资料转到:



再次问好!

你好



互联网上有很多类似这样的东西,但我不确定如何让它成为本地的。



请帮忙。



我尝试过:



我已经有了工作资料和登录系统。

解决方案

现在这是数据库的工作,您应该考虑向应用程序添加数据库表。每个网站都使用数据库连接,让它成为Twitter,Facebook甚至是CodeProject本身。



我建议您学习使用MySQL和PHP,因为PHP将用于将请求发送到MySQL服务器以保存数据。这就是CRUD付诸行动的地方。 CRUD是:



1.创建

2.阅读

3.更新

4.删除



它们用于创建新记录,读取,修改它们,甚至在不再需要时删除它们。了解完之后,您将能够将帖子存储在表中,然后提取特定用户的记录。请记住,Twitter使用用户ID来提取结果;例如我的用户名是@afzaalvirgoboy,Twitter会使用URL中的这个来拉我的推文等等。



PHP和MySQL [ ^ ]

I want to create a system, almost like Twitters (but much more simple), that creates a post on a users page when they share something.

E.g:

User 1 posts
"Hello!"

User 1's profile goes to:
"Hello!"

User 1 posts
"Hello again!"

User 1's profile goes to:

"Hello again!"
"Hello"

There's lots on the internet similar to this, but I am unsure on how to make it local.

Please help.

What I have tried:

I already have a working profile & login system.

解决方案

Now that is the job of a database, you should consider adding a database table to your application. Every website uses a database connection, let it be Twitter, Facebook or even CodeProject itself.

I would recommend that you learn using MySQL with PHP, because PHP is going to be used to send the requests to MySQL server to save the data. This is where CRUD comes into action. CRUD are:

1. Create
2. Read
3. Update
4. Delete

They are used to create new records, read them, modify them or even delete them when they are not required anymore. Once you have learnt that, you will be able to store the posts in the table and then extract the records for a particular user. Remember, Twitter uses the user ID to extract the results; for example my username is @afzaalvirgoboy, Twitter would use this from the URL to pull my tweets and so on.

PHP and MySQL[^]


这篇关于我怎么能创建一个本地邮政系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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