简体   繁体   中英

What script should I attempt first?

I've just got started with the basics (as well as a few intermediate aspects) of HTML, CSS and PHP. What is a good starting point to practice these 3 languages?

I was thinking of writing a URL shortening script but I was wondering if anyone here might have a better idea.

I am looking to develop something that would help me broaden my knowledge of the above 3 languages, but it shouldn't be too advanced that I wouldn't even know how to start it.

Any suggestions would be appreciated.

Whatever you write, if you allow users to input anything, prepared for it to get spammed and hacked mercilessly as soon as it goes live.

Therefore I'd suggest starting with something where you don't give end users any input ability. Something like an image gallery, or a CMS where you as the site admin can create the content, but end users only get to see the finished pages.

If you're feeling more adventurous, you could write a guestbook app, or something like that, but be warned that you'll have to learn quickly all the security aspects of allowing end user input. You'll need to learn how to block spam, avoid SQL injection attacks, prevent cross-site scripting attacks, and a whole bunch of other stuff.

That's all important stuff to know about, but perhaps best left to your second project rather than your first.

Some common beginner tasks are:

- image gallery
- message board
- phone book
- simple forum

These simple projects will allow you to get accustomed to the languages and prepare you for the next steps: security, optimization, user experience, and maybe other.

I recommend trying something very simple at first and finishing it. Only after that you should start something bigger, or better still improve on your first project.

A simple blog platform would be a potentially good second or side project, with the opportunity for enhancement as your skills improve and incorporating things you'll learn from other smaller systems. Start from a single-user blog without comments, and build things up as you go along. Gives you some more free reign to play around on the design (HTML and CSS) side of things as well, and you can always throw in some simple JavaScript as well.

I'll say that @Alin's answers are some good potential starter projects as well, and @Spudley's answer is a good one.

And above all else - have fun!

I support a few of these . I would also suggest you look into doing something for someone else, say a small project. One think I find with myself and those I've taught is that it's a lot harder to commit to something when it's your own project. You also get caught up in the details. When you're doing it for someone else, though, it minimizes the chance.

Also look into using a MVC framework as a way to learn. Good MVC frameworks will allow you to play around while learning how classes work in PHP. I'm sure there are plenty of questions regarding them on SO.

Finally, if none of that leads you anywhere, think of something fun you'd like to try, not matter the difficulty, and go with that. Even if you don't complete a project, there's a high chance you learned something on the way, and that's worth your time.

您可以从http://www.w3schools.com开始阅读并做一些示例,他们对您想要在html,php和css.m中使用的所有内容都有很好的解释。

Here are a couple suggestions:

  1. Guest book
  2. Simple client / project management

No PHP script could help you with html and css.
You have to master these things separately.

if you want to practice with html and css - just create an HTML page that represents one of your site/script pages and use it to train your html,css skills. And it will have absolutely nothing to do with PHP part.
Just once you have finished with HTML, you will need to produce the same text dynamically.

Make blog. One step at a time:

  1. On the main page articles one after another. Store them in files.
  2. On the main page only 3 newest. Access the rest of them by menu.
  3. Add option to create new articles.
  4. Add option to edit or delete them.
  5. Restrict access to these actions by using logins and passwords stored in file.
  6. Add option to comment articles.
  7. Add option to remove comments only by administrators (those logged with login and password).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM