刚学PHP,求介绍THINKPHP框架的优劣
刚开始学习PHP语言,在网上看到thinkphp的框架和文档,开发手册神马的都很详细。
这个PHP框架相比其他框架有啥优点和缺点呢,对于新手,该如何选择呢?
回复内容:
刚开始学习PHP语言,在网上看到thinkphp的框架和文档,开发手册神马的都很详细。
这个PHP框架相比其他框架有啥优点和缺点呢,对于新手,该如何选择呢?
要学的话.推荐一个教程.http://www.5idev.com/thinkphp
按照这个来,你会觉得tp上手很容易
建议你从一开始就别学框架,用了框架你就不会PHP了,还是建议你先学PHP,再根据需要选择一种最合适你近几年工作的框架,我以前用的是 Phalcon。
对于新手,还是不要用框架了,框架就像一部汽车,高效并且舒适,但是你还没学会走路,就去开车了。也许简单的网站的确能写下来,但由此带来的问题是由于对PHP本身的不了解,从而使代码变得不安全和出了问题无从解决。我看到很多新手在用TP框架做一些所谓的项目,但却问一些很基础很基础的问题。
建议您还是先将PHP基础部分学好学扎实,手册中的函数不求都能了解,但多半的函数应该知道他的存在和用处。学习一些原生SQL和防注入的原理和方法,在用模板引擎之前,最好能先写几个混编的小项目。这些是我的一些经验,仅供参考。
至于ThinkPHP,可以作为您熟悉PHP之后,学习的第一个框架,ThinkPHP官方最近2个月对开发文档做了不小的努力,您可以到其官网查看,文档丰富是其优点。您可以在学习使用ThinkPHP的过程中,了解框架的运行机制和原理,为接触一些更优秀的框架打下基础。
thinkphp还不错,找一个简单的网站项目,或自己的个人站,参照官方手册,最好下一个chm格式的,然后就这样边做边学习,做完,你就上手了。
觉得框架是适合有点程序开发基础的人快速开发用,不一定要有PHP基础,例如偶在学校的时候都是混日子,只学到一些最基本程序开发知识(你懂的),毕业后第一份工作就是用php开发网站,之前没有学过html/css/js/php,一开始在老板的指导下就直接用CI了,感觉还可以,本身CI入门也简单~~~
优点
1. 文档全,非常非常友好,不会英文的童鞋幸福了
2. 资料多,国人用的人非常多,有问题可以到官网上提问,回复很及时
3. 话是中国自己人写的,无论是文档还是注释什么的都是中文,学起来很方便,zf的话至少是英文的,学起来会比较麻烦
4. 框架比较中国味道,什么A,D,I方法什么的好乱伐,但基本0配置是使用起来很方便~
5. 模板语言很吊啊
6. 编译型框架,速度快快滴
7. ORM比较省心,model的连贯操作很省心
缺点
1. 哥是有洁癖的人,A,D,I方法什么鸟玩意?大道至简?大贱之道吧。
2. thinkphp3.1版本以前版本跟稳定,thinkphp3.2之后变动比较大,容易扯着
php初学者不要直接上手框架嘛,自己先实现一个简单的mvc小框架,做个orm层玩玩,先深谙下下mvc框架们的用心,技术才有大出息,要不就囫囵吞枣了。
可以帮你找到工作,可以帮你干好工作
没法帮你装逼
很实用,我是从3.2.3开始用的,做了些OA,商城方面的东西。国内不少项目用的是这个,碰到问题不会太寂寞。

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

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

What are the magic methods of PHP? PHP's magic methods include: 1.\_\_construct, used to initialize objects; 2.\_\_destruct, used to clean up resources; 3.\_\_call, handle non-existent method calls; 4.\_\_get, implement dynamic attribute access; 5.\_\_set, implement dynamic attribute settings. These methods are automatically called in certain situations, improving code flexibility and efficiency.

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

PHP and Python each have their own advantages, and the choice should be based on project requirements. 1.PHP is suitable for web development, with simple syntax and high execution efficiency. 2. Python is suitable for data science and machine learning, with concise syntax and rich libraries.

Using the ThinkPHP6 framework combined with elasticsearch-php client to operate Elasticsearch...
