回复内容:
Bullshit. 这和说『熟练掌握了 do 和 have 就等于掌握了英语』一样纯属扯淡。 “熟练掌握了 if 和 while”和“会用if while”是不一样的,而很多回答都把“熟练掌握”偷换成了“会用”。首先,if while即代表了选择结构和循环结构,这两者加上顺序结构(无特定关键词),三者是组成任何算法的基石(语言无关),或者说,任何一种算法,都可以用这三种逻辑结构来实现,这是早已被严谨证明的。熟悉掌握了这三者,也就有了大半江山。
其次,熟练掌握绝不意味着仅懂得它们的基本语法格式,这只是个开始,熟练掌握它们在各种情形下的使用,以及由此展开所涉及的各种算法、相关经验技巧等,范围相当之广。if while这两个词在这个层面上,不再是两个语法,而是代表了对整个语言的熟练运用。
这俩词,看起来很短,实际上却很长。 我觉得没有道理。PHP里面东西很多的。 恩 这个也许只能说基本语法,这才算学好PHP的第一步吧!
个人认为学习PHP分几个层次,具体如下:
1.基本语法
这个可以说是练功过程中的马步,基础必须扎实啊。扎实了才可以往下看其他的东西。 2.PHP+MYSQL
PHP与数据库的最佳拍当,最好有时间还可以学习一下他的另两个拍当,Linux和apache。
3.面向对象
这个更是非常重要的一个东西,也许这些在基本语法中已经涉及过了。但是面向对象远远不是单纯的定义几个类,定义几个方法这么简单。这是一种思想。有时候通篇都是函数,但是却是面向对象的很不错的实践,这个说的是开源CMS drupal。
4.设计模式
学习这个东西,可以在单纯实现你代码的基础上,提高你的代码的可读性,可扩展性。可以更好的和其他人合作。
5.模板引擎
有名的有Smarty,可以看看官方网站的手册http://www.smarty.net/或者到一些论坛下载手册。使用模板引擎,可以实现PHP与前台界面之间的分离。
6.二次开发
像大多数论坛,博客都是二次开发的。有discuz!,Wordpress,phpwind等。可以写一些插件或者主题,同时贡献给开源组织,供大家学习讨论。
7.用框架开发
如:ZendFramework,YiiPHP,CI等。PHP框架确实是个好东西,可以极大的减少重复的工作量,而且框架往往都是汇集了N多程序员的智慧,是个不可多得的学习材料。
8.研读别人的代码 你如果第5步用的是Smarty的模板引擎,那你现在可以读读Smarty的代码(前提,第3,4步做得比较好),之后是读第6步里面的
9.开发自己真正成熟的框架或PHP应用程序。这格式后写出来的程序就不像第2步中写的那样,因为你要吸取一些开源的程序框架的优点。这时候你程序的性能和可扩展性就会极大的提高。
9.你会发现有些东西是程序还不能解决的。
10研究更底层的技术,这时候就不是单纯的PHP程序员了。
这些东西是来源于网上看到的一篇文章,加入了一些自己的理解,感觉还是蛮有道理的。
判断和循环是每种语言的精髓、也是用到的最多的知识、但是并不是学到了全部、这样说总是感觉有点瞧不起php的赶脚 题主说的 只能算入门。
只考虑实现功能的程序员是非常恐怖的。他会在代码中埋下N多坑。性能问题。维护问题。安全问题。逻辑问题等等。
引用一下某牛说的 好程序员定义
我觉得好程序无非三点:我写了八年代码 用while的时候 一只手都数的过来。。。。 多谢邀请
1、性能优秀,性能是程序很重要的一个特性,无论是办公软件、杀毒软件、游戏还是web几乎所有的程序都是很关注性能的,没人喜欢慢吞吞的软件,我们学的计算机原理,算法,数据结构,各种xx性能优化,各种xx调优,各种高性能xxx,各种xx编程艺术,各种架构,分布式也好,并行计算也好最终目的是什么?就是为了良好的性能,说白了就是为了程序效率
2、容易维护:程序不是一成不变的,维护性也很重要,什么代码整洁之道啊,程序员素养啊,大道至简啊,软件工程啊,设计模式,重构,REST,AOP,IOC,面向对象,UML,文档驱动开发,等等各种方法各种概念,其实目的无非就是让程序代码更优美,结构更合理,改起来更方便,以后更好维护。
3、鲁棒性好:作为好程序来讲,BUG一定要少,这是必须的,对于用户的各种合理不合理操作都要有良好的应对方案,我们学习各种测试技术、各种编程思想,安全技术,密码学、各种高可用、各种主从架构,各种备份技术等等都是为了让我们的程序保证良好的运行状态,不论是用户的误操作还是恶意攻击,无论是天灾还是人祸我们的程序都能从容面对。
if while 等判断语句在很多编程语言里面十分常用,但是不代表掌握了它们就算是掌握了这门语言,这仅仅是基础而已
个人认为这句话大概是想表明php简单易学而已,不过也有误导人的意思 如果只是语言本身,算有道理。
但是,现在的高级语言(如PHP、Java、C#、Ruby)更重要的是语言之外的东西,如库、模式、调优等等 对于熟悉FP的人来说, 这句话是对的, 其它的不知道.

Load balancing affects session management, but can be resolved with session replication, session stickiness, and centralized session storage. 1. Session Replication Copy session data between servers. 2. Session stickiness directs user requests to the same server. 3. Centralized session storage uses independent servers such as Redis to store session data to ensure data sharing.

Sessionlockingisatechniqueusedtoensureauser'ssessionremainsexclusivetooneuseratatime.Itiscrucialforpreventingdatacorruptionandsecuritybreachesinmulti-userapplications.Sessionlockingisimplementedusingserver-sidelockingmechanisms,suchasReentrantLockinJ

Alternatives to PHP sessions include Cookies, Token-based Authentication, Database-based Sessions, and Redis/Memcached. 1.Cookies manage sessions by storing data on the client, which is simple but low in security. 2.Token-based Authentication uses tokens to verify users, which is highly secure but requires additional logic. 3.Database-basedSessions stores data in the database, which has good scalability but may affect performance. 4. Redis/Memcached uses distributed cache to improve performance and scalability, but requires additional matching

Sessionhijacking refers to an attacker impersonating a user by obtaining the user's sessionID. Prevention methods include: 1) encrypting communication using HTTPS; 2) verifying the source of the sessionID; 3) using a secure sessionID generation algorithm; 4) regularly updating the sessionID.

The article discusses PHP, detailing its full form, main uses in web development, comparison with Python and Java, and its ease of learning for beginners.

PHP handles form data using $\_POST and $\_GET superglobals, with security ensured through validation, sanitization, and secure database interactions.

The article compares PHP and ASP.NET, focusing on their suitability for large-scale web applications, performance differences, and security features. Both are viable for large projects, but PHP is open-source and platform-independent, while ASP.NET,

PHP's case sensitivity varies: functions are insensitive, while variables and classes are sensitive. Best practices include consistent naming and using case-insensitive functions for comparisons.


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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Zend Studio 13.0.1
Powerful PHP integrated development environment

Atom editor mac version download
The most popular open source editor

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
