php第一阶段考总结
先说学习php阶段吧,因为从学长那里知道学php的话,《细说php》这本书比较好,所以我们这个阶段都用了这本书。
这本书太厚了,因为时间有限,所以当时就是大致把这本书看了一遍,当看完后,准备开始做的时候,才发现,原来看的东西基本上都忘完了,但是已经没有时间了再重新再看一遍了,就开始写了。
php基础,其实还是比较简单的,只要将一个异步提交的流程及一些基本的php,js,html,apache它们之间的联系及原理弄明白了,个人感觉基础阶段就够用了。所以最痛苦的是刚开始写的那几天。刚开始那几天,因为异步提交的格式及流程不太清楚,所以程序就光报错。
还有sublime还不会提示哪错了,找错就特别不容易,有时候一个sql语句写错了,需要看四五遍,甚至更多。后来找学长、学姐,让他们帮忙找问题。我就慢慢学会简单调试。
还有一个就是POST、GET提交问题,原来我一般都用post,因为感觉post比较安全。后来发现了一个问题:我用ajax把数据用post提交过去,将结果输出后,双击那个结果产生的链接,打开后,那个界面就空了,,但是用get可以实现。。
所在那以后如果是处理 数据库,或判断什么东西,我都用post提交;如果是在php直接输出html界面,我就用get提交。然而当时并不知道原因
后来,我这个程序基本上昨完了,去问学长,这才真正明白,post与get的真正区别
post就是专门用来后台处理提交的数据,然后返回一个结果,,然后用js,对dom模型操作;
get是提交数据后,处理后可以直接在php界面当成html输出,,get处理后返回的是一个html界面
还有就是数据类型 json刚开始也不了解,后来,听学长讲课才知道原来json里面可以嵌套好多层
在5月19日晚上进行了php第一阶段考核,在考核前感觉自己做的个人博客系统还不错,但是,考核时,有感觉自己的东西不好,出现了好多问题,特别是与安全(权限、重复登录、刷访问量、下载文件)问题,这些问题当时在写的时候,完全没有考虑到。
还有我大部分html是直接在前台输出的,,所以echo用的太多了,写了好多字符串,我感觉这点都不太好,但当时如果全部都用ajax又嫌太麻烦。所以到最后还是直接在php里直接输出了。
问题:
1.对于cookie和session,刚开始不会用header跳转,我就用js判断cookie,,后来,用php判断session,,用echo输出js标签,在那里面用js跳转
2.对于多次登录问题:我在数据库中user表中加了两个字段:user_ip(用户登录ip)、state(用户登录状态)
3.回复问题,现在还没有改好,还是存在一定的不合理性
4.UE插件图片上传(upload) (设置文件夹权限)
5.文件路径不能存入数据库,只能把文件名存入数据库,然后通过配置文件中的一个量是文件所在目录,将它们拼接起来,来获取其路径
6.对于图片预览问题:修改了model,在图片名前加了个img标签,来展示图片
本次刚接触php,许多语法等东西还不熟悉,所以程序有很大的局限性,并且没用用到面向对象的思想。。这点以后要特别注意。。

What’s still popular is the ease of use, flexibility and a strong ecosystem. 1) Ease of use and simple syntax make it the first choice for beginners. 2) Closely integrated with web development, excellent interaction with HTTP requests and database. 3) The huge ecosystem provides a wealth of tools and libraries. 4) Active community and open source nature adapts them to new needs and technology trends.

PHP and Python are both high-level programming languages that are widely used in web development, data processing and automation tasks. 1.PHP is often used to build dynamic websites and content management systems, while Python is often used to build web frameworks and data science. 2.PHP uses echo to output content, Python uses print. 3. Both support object-oriented programming, but the syntax and keywords are different. 4. PHP supports weak type conversion, while Python is more stringent. 5. PHP performance optimization includes using OPcache and asynchronous programming, while Python uses cProfile and asynchronous programming.

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP remains important in the modernization process because it supports a large number of websites and applications and adapts to development needs through frameworks. 1.PHP7 improves performance and introduces new features. 2. Modern frameworks such as Laravel, Symfony and CodeIgniter simplify development and improve code quality. 3. Performance optimization and best practices further improve application efficiency.

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

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.


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

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version
Useful JavaScript development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.