经常在某些论坛和QQ群里看到一些朋友会问“怎样才能学好PHP,怎样才能学好***语言 ”,但别人回答最多的是:从最“简单”的开始。
这个简单也许真的不简单,呵呵。下面我想分享一下自己学习的一些过程。先说些费话,语言组织能力差,说了不少费话,愿意看的就看,不要骂我就行。
其实学习一门新语言并不是太难,重要的是你有没有准备好去学好它,时间的长短和个人的能力和决心有关。黑客界也流行一句话就是“没有入侵不了的计算机”,这句话大概的意思是说:如果你的技术比维护这台计算机的管理员更胜一筹,那么就能拿下这台计算机甚至能拿下这个管理员管理的所有计算机,如果技不如人,只能继续学习超过对方。我说这些话的意思就是让准备学习陌生语言朋友一定要下决心去学习,只要你下了决心去学了,就一定能学好,千万不要半途而废。(退一万步来说,即使是没学好,但你懂的必然比别人多)
了解什么是最简单:
1、网页的基本构成就是html代码,所以必须熟悉HTML/CSS/JS等基本元素
2、熟悉PHP语法,了解PHP和HTML的运行方式,学习将PHP与HTML结合完成简单页面
PHP手册是比较好的入门老师
影响学习进度和程序强大是否的几个可能因素:
1、记忆力
一门语言的强大是否,应该看它的函数库和代码执行效率。
每门语言都是有自己强大的函数库,要学好它,就必须得花很多的时间去记忆,良好的记忆力能使学习达到事半功倍的效果。
2、数学和逻辑思维
这个当然不是绝对影响,因为看开发项目的复杂程度。小的项目不需要太多的数学和逻辑思维能力,但如果是开发类似于财务或大量运算相关项目,这一点就是非常重要了。
3、有其它语言的基础
“一通百通”,这句话的道理也是不容置疑。都说有C语言基础的人,学习PHP比较容易,我没学过C语言,所以不知道这句话的效果
4、多看别人写的代码
学习别人的长处,补自己的不足,当然不完全为这个。我始终相信:一个有组织的团队写出来的程序不会比个人差。
我PHP入门就是从看代码开始的,我喜欢看别人写的代码(入门是从disucz,PHPWind和国外的phpbb看起,还有就是目前最流行的开源 BLOG程序),我尽可能的收集网络上的PHP开源程序,到目前为止,我收集并下载的PHP开源程序有2GB大小,包括BBS,BLOG,CMS等。我下载并不是为了收藏他们,是学习他们的编程方式和实现方法,如果自己想实现的功能不知道怎么去实现,我就会学习他们的实现方法,并不是抄袭代码,最终结果是想通过学习,将技术变成属于自己的。ASP我也是以同样的方式学习的(动易和讯的程序及其它ASP开源程序)
5、实践
理论固然重要,但实践必不可少。你理论知识再好,如果不实践,就不能看到理论所产生的结果或效果,并不能使你的记忆深刻,所以不能纸上谈兵
6、恒心
广告不是有句话是这样说的么:“世界上最高的山是自己”,这句话相信朋友们都能理解自己这关,其它的都好办
7、找对自己有用的学习方式
这条可以参照4,我的入门是从看代码开始
可能有朋友会问:“一开始看那些强大的代码,你能看懂么?”
我的学习方式是从“使用”找“学函数”:PHP的函数太多,短时间不可能记住所有的函数,因为我相信,一个大的项目肯定会使用常见和必须的函数,找到这些函数,才会有重点的学习这些函数,难道你能说写BBS的函数会比写BLOG用的函数少么?难道会写BBS还不会写BLOG么?
找对学习方式是要经过多种学习方式的尝试,所以这个只有自己把握,毕竟每个人的学习方式不一样
8、尽可能的找视屏教程看
别人说十句,还不如一个操作看的明白,这个相信朋友们都有体会吧
9、从项目开始
一定要"逼"自己从写项目开始。
任何一个高手的“成长”都是要经历一个过程,这个过程是一步步走过来的,来之不易
很多朋友学习PHP的第一个作品几乎都是“留言簿”,因为是最简单的程序了
会写留言簿,也并不能完全代表你已经入门了,也并不代表就会了PHP,我自己开始想以一个“网络书签”作为自己的第一个作品,但写了基本功能后就没继续了,感觉没多大意思。现在写一个完全正确针对企业的CMS系统,包括针对企业的一些常用功能,我想以这个作为自己PHP入门的第一个作品
10、了解并学习和PHP有关的技术
真正的高手必须得学习和PHP关联的技术,要想学好PHP,就必须得学习数据库,PHP+MYSQL被认为是“黄金搭档”。所以你必须得接触MYSQL或你认为比较好的数据库,开始设计比较"合理"的数据库,这里的合理就比较广泛了,包括数据库优化和查询优化等等。
最后想说的是:“不要依靠别人”没人愿意理会一个新手的提问,因为新手提问的在他们眼里太简单,不想去解释。女性朋友很流行一句话是“男人靠的住,母猪会上树” 引用这句话没别的意思,只是让朋友们知道这句话的意思。
还想说的是:“珍惜别人回答的次数”人的忍耐都是有限度的,一定要珍惜这个限度,不要什么问题都去问,有些问题自己花点时间能找到答案的也去问,每问一次,别人的耐心就减去一次,等你真正需要帮助的时候,正好是别人不愿意回答你的时候,可以想像一下,你失去的太多了。
建议的是:“有问题?baidu一下”相信朋友们都已经注意到了,你问的问题,在搜索引擎里都能找到相关的提问,并且有详细的解决方案,你可以使用搜索引擎来找到自己的答案,何必去问别人呢
目前最大的中文搜索引擎是 baidu.com ,全球的google,当然还有其它的搜索引擎,一个找不到,多试几个,除非你的问题是第一个提问的 ,那么你是幸运的,也可能是你“长相”问题,呵呵,说笑的,不要介意,不过这句话倒是挺流行

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values and handle functions that may return null values.

In PHP, use the clone keyword to create a copy of the object and customize the cloning behavior through the \_\_clone magic method. 1. Use the clone keyword to make a shallow copy, cloning the object's properties but not the object's properties. 2. The \_\_clone method can deeply copy nested objects to avoid shallow copying problems. 3. Pay attention to avoid circular references and performance problems in cloning, and optimize cloning operations to improve efficiency.

PHP is suitable for web development and content management systems, and Python is suitable for data science, machine learning and automation scripts. 1.PHP performs well in building fast and scalable websites and applications and is commonly used in CMS such as WordPress. 2. Python has performed outstandingly in the fields of data science and machine learning, with rich libraries such as NumPy and TensorFlow.

Key players in HTTP cache headers include Cache-Control, ETag, and Last-Modified. 1.Cache-Control is used to control caching policies. Example: Cache-Control:max-age=3600,public. 2. ETag verifies resource changes through unique identifiers, example: ETag: "686897696a7c876b7e". 3.Last-Modified indicates the resource's last modification time, example: Last-Modified:Wed,21Oct201507:28:00GMT.

In PHP, password_hash and password_verify functions should be used to implement secure password hashing, and MD5 or SHA1 should not be used. 1) password_hash generates a hash containing salt values to enhance security. 2) Password_verify verify password and ensure security by comparing hash values. 3) MD5 and SHA1 are vulnerable and lack salt values, and are not suitable for modern password security.

PHP is a server-side scripting language used for dynamic web development and server-side applications. 1.PHP is an interpreted language that does not require compilation and is suitable for rapid development. 2. PHP code is embedded in HTML, making it easy to develop web pages. 3. PHP processes server-side logic, generates HTML output, and supports user interaction and data processing. 4. PHP can interact with the database, process form submission, and execute server-side tasks.

PHP has shaped the network over the past few decades and will continue to play an important role in web development. 1) PHP originated in 1994 and has become the first choice for developers due to its ease of use and seamless integration with MySQL. 2) Its core functions include generating dynamic content and integrating with the database, allowing the website to be updated in real time and displayed in personalized manner. 3) The wide application and ecosystem of PHP have driven its long-term impact, but it also faces version updates and security challenges. 4) Performance improvements in recent years, such as the release of PHP7, enable it to compete with modern languages. 5) In the future, PHP needs to deal with new challenges such as containerization and microservices, but its flexibility and active community make it adaptable.

The core benefits of PHP include ease of learning, strong web development support, rich libraries and frameworks, high performance and scalability, cross-platform compatibility, and cost-effectiveness. 1) Easy to learn and use, suitable for beginners; 2) Good integration with web servers and supports multiple databases; 3) Have powerful frameworks such as Laravel; 4) High performance can be achieved through optimization; 5) Support multiple operating systems; 6) Open source to reduce development costs.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 English version
Recommended: Win version, supports code prompts!

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 Linux new version
SublimeText3 Linux latest version