Table of Contents
回复内容:
Home Backend Development PHP Tutorial 新人刚学php,遇到一些困难,有人能帮帮忙吗?

新人刚学php,遇到一些困难,有人能帮帮忙吗?

Jun 06, 2016 pm 04:44 PM
java php wamp

最近刚开始学php,用的wamp环境,学了一个星期了,跟着视屏学的,感觉流程大概熟悉了一点,但是不会写。希望有朋友能提供一下您认为比较好的学习方法,最好详细一点~本人基本没有基础,只学过C语言,看过一些java基本语法规则。昨天导师配了我一个任务,很简单,就是通过电信服务商的接口写一个内部的提示信息,输入号码可以显示号码的各种信息,但是窝没头绪。。真心觉得不简单==诚心求助TT

回复内容:

首先 你往下读我的答案的前提是你想做web开发 如果你并不想做web开发 只是玩玩 帮导师完成任务之类的 那建议不要学PHP了 还不如去学Python 学了PHP你只能做web 但是学了Python你能干的东西就多了 当然不是说PHP不能干 只是不好干。
==================
第一步
如果只写过C,入门PHP时我觉得看视频很好,看的时候最好把人家的示例自己做一遍,边看边做比较好。视频我推荐PHP100中文网上的,当时学的时候也是用这个入门的。
第二步
然后就该看看文字的东西了,毕竟视频还是很局限的,只能用来入门用,如果你告诉一个程序员你是看视频教程学写代码的你会被鄙视的。w3school上的PHP 教程中,PHP基础和PHP表单两部分你应该过一遍(可以快速过一遍,知道之后用的时候在哪就行)。同时在这个阶段你应该学会自己手动配置WAMP环境,不要在使用集成的环境了。
第三步
这时候应该写点东西了,写个自己的博客,或者随便什么的,总之要写一个站,包括登录注册功能还有表单发布信息。从这里你要理解cookie session post get 数据库设计 权限控制 ,熟悉使用
SQL的增删改查语句,总之把你之前在w3cschool中看到的东西过一遍。
第四步
这个阶段需要静下心来在读一本书,再系统的学习一下,确保对基础语法基本掌握。推荐PHP和MySQL Web开发(原书第4版) (豆瓣)
第五步
有了上面的基础,你可以尝试框架,推荐ThinkPHP框架,或者其他你喜欢的。最好还是在写一个站,继续熟悉。另外最好抛弃Windows开发,开始使用LAMP,最好能买个VPS,尝试着配置LAMP环境。推荐DigitaloceanSSD Cloud Server, VPS Server, Simple Cloud Hosting
第六步
学习PHP面向对象的部分以及一些核心的东西,PHP核心技术与最佳实践 (豆瓣)、深入PHP:面向对象、模式与实践(第2版) (豆瓣)、PHP高级程序设计 (豆瓣)、高性能PHP应用开发 (豆瓣)这几本书应该要看一下。
=====================
以上是我根据我自己学的时候大概的流程,总之既然想学,就不要怕麻烦,必须的静下心来学东西,写东西。另外上面只是说对于PHP的部分,其实额外还会牵扯到很多东西,比如HTML+CSS+Javascript这是无条件要掌握的,最好还能熟练使用JQuery和Bootstrap,这样你写的站的前端就不用发愁了;数据库设计、设计模式、Web安全知识、RESTFulAPI的设计肯定也要知道的;另外最好不要局限于一种脚本,像其他的Ruby Python NodeJS最好也学习一下,能够掌握每种语言的一种框架,例如Rails Tornado Express。 1. 读手册,模仿手册上的例子.
2. 读手册.
3. 读手册
n. 熟悉一个简单的开源项目 + 读手册 开始学尽量去看文档,或者 w3school ,看视频效率太低,把 w3school 上的教程挨个写一遍,不要怕麻烦,写完一遍后再写一个简单的留言板,再写一个完整的博客,就这样。 理解http访问的过程,看一下php的curl,会用post和get方法获取网络数据,然后解析数据,可能是json或者xml或者是html页面,那么就要看一下xml解析和正则匹配,或者开源的类库也可以用,直接封装了,不用在意里面细节,获取数据,显示信息。 大学的时候没有接触过PHP,工作以后才知道PHP这个东西,一个星期,要求是实现 linux 的 cat 命令和 tail 命令,实现完以后,第二周开始做项目了,觉得问题不大,有C基础的话不用怎么学吧
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

How do you parse and process HTML/XML in PHP? How do you parse and process HTML/XML in PHP? Feb 07, 2025 am 11:57 AM

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

PHP Program to Count Vowels in a String PHP Program to Count Vowels in a String Feb 07, 2025 pm 12:12 PM

A string is a sequence of characters, including letters, numbers, and symbols. This tutorial will learn how to calculate the number of vowels in a given string in PHP using different methods. The vowels in English are a, e, i, o, u, and they can be uppercase or lowercase. What is a vowel? Vowels are alphabetic characters that represent a specific pronunciation. There are five vowels in English, including uppercase and lowercase: a, e, i, o, u Example 1 Input: String = "Tutorialspoint" Output: 6 explain The vowels in the string "Tutorialspoint" are u, o, i, a, o, i. There are 6 yuan in total

Break or return from Java 8 stream forEach? Break or return from Java 8 stream forEach? Feb 07, 2025 pm 12:09 PM

Java 8 introduces the Stream API, providing a powerful and expressive way to process data collections. However, a common question when using Stream is: How to break or return from a forEach operation? Traditional loops allow for early interruption or return, but Stream's forEach method does not directly support this method. This article will explain the reasons and explore alternative methods for implementing premature termination in Stream processing systems. Further reading: Java Stream API improvements Understand Stream forEach The forEach method is a terminal operation that performs one operation on each element in the Stream. Its design intention is

Java Made Simple: A Beginner's Guide to Programming Power Java Made Simple: A Beginner's Guide to Programming Power Oct 11, 2024 pm 06:30 PM

Java Made Simple: A Beginner's Guide to Programming Power Introduction Java is a powerful programming language used in everything from mobile applications to enterprise-level systems. For beginners, Java's syntax is simple and easy to understand, making it an ideal choice for learning programming. Basic Syntax Java uses a class-based object-oriented programming paradigm. Classes are templates that organize related data and behavior together. Here is a simple Java class example: publicclassPerson{privateStringname;privateintage;

Create the Future: Java Programming for Absolute Beginners Create the Future: Java Programming for Absolute Beginners Oct 13, 2024 pm 01:32 PM

Java is a popular programming language that can be learned by both beginners and experienced developers. This tutorial starts with basic concepts and progresses through advanced topics. After installing the Java Development Kit, you can practice programming by creating a simple "Hello, World!" program. After you understand the code, use the command prompt to compile and run the program, and "Hello, World!" will be output on the console. Learning Java starts your programming journey, and as your mastery deepens, you can create more complex applications.

7 PHP Functions I Regret I Didn't Know Before 7 PHP Functions I Regret I Didn't Know Before Nov 13, 2024 am 09:42 AM

If you are an experienced PHP developer, you might have the feeling that you’ve been there and done that already.You have developed a significant number of applications, debugged millions of lines of code, and tweaked a bunch of scripts to achieve op

See all articles