Home Backend Development PHP Tutorial 散分,终于用THINKPHP+smarty+jquery 改写PHPWIND完成了解决办法

散分,终于用THINKPHP+smarty+jquery 改写PHPWIND完成了解决办法

Jun 13, 2016 am 10:16 AM
javascript nbsp php thinkphp

散分,终于用THINKPHP+smarty+jquery 改写PHPWIND完成了
终于用THINKPHP+smarty+jquery 改写PHPWIND完成了,高兴.希望PHP,J2EE企业级应用这块市场越来越大,希望我能再找个好工作,希望CSDNER的工资水涨船高,早点买房买车.
  这是代码地址http://download.csdn.net/source/2490856
  这是自学过程看过的书和笔记,分享给大家http://topic.csdn.net/u/20100627/18/1f3b42ba-d3a9-487d-9c5e-4998dfc4ca53.html
  这是我在开发过程中遇到的问题,大家帮我看看.
1:用框架写代码,人可能会变傻.
2:PHPwind源代码有很多都是用过程方式写的,这儿include一大段,那儿includes一大段,读起来好费劲,有段时间都抓狂了,为什么他不用OOP写?像PHP这种不要编译的语言,用OOP写是不是影响性能?
1:我用的文本编辑器是xheditor插件,因为小,顺便支持一下国产.后来发现页面载入的时候,性能好差,不知道你们都用什么文本编辑插件.
3:站点记住访问者的信息,我用的方法是在cookie里面写两个数据,一条保存用户名,第二条保存密码,每次用户访问站点,站点自动检测cookie,如果有这两条信息,就自动登录.我觉得这个方法不好,有没有更好的方法?
4:PHP里面自带的函数很多都是用的引用传递,我习惯用值传递(写java的时候养成的习惯),感觉用引用传递容易引起混乱,而且不容易阅读,不知道你们怎么看.
5:写下载功能的时候发现,下载一个大文件,会让页面载入变得好慢,应该是没有写缓存引起的,不知道这个问题这么解决,phpwind那段代码看不懂.
6:PHPwind模板文件,javascript,css,和页面数据夹杂在一起,修改起来挺麻烦,这样是不是不好?很多书上都说,要把JavaScript,css,和数据分开.
7:PHP不支持常量数组,就是把一个数组赋值给常量.
8:数据库里有一个表专门记录当天的访问日志,我想让它每天过了24点就自动添加一条记录,在java里面很好解决,用一个线程或一个servlet就可以了,php不支持线程,不知道怎么写?
9:为什么PHP没有像spring那样的框架?我觉得把所有代码都肢解成零件,用的时候在装配起来,不好吗?

P.S. 这个帖子介绍了我自学时用看过的书,推荐给朋友,所有的书都有电子版,如果找不到,或需书的笔记,或需要我收集的技术文章,可以联系我(笔记以注释的形式保持在书的pdf文件里).QQ:1441825297

P.S.想换个工作,也可以做兼职,熟练掌握PHP(非常熟练)和J2EE技术,SSH,ZF,TP,Smarty,JavaScript,css,jquery,ajax,DHTML等等关于J2EE企业级开发和PHP网站开发的技术.

------解决方案--------------------
SF,学习了。
------解决方案--------------------
后面的不懂,但是我知道该接分了!
------解决方案--------------------
PS 这么多东西 你学的过来的话 倒是个强人了 
水平有限 逐一回答
1:框架不但不会变傻 反而容易管理 熟悉了 看看类名 就知道是MVC的哪一个模块
2:OOP不会影响性能 因为PHP也是自动回收内存的语言 phpwind也不如phpBB名气大 未必就是一个标准
3:NetBeans(编码+UML+SQL前端) + Dreamweaver(静态页面,美工活儿)
4:可以生成一张伪session表 PHP可以绑定函数到函数 结合mysql 实现session数据表 增加个登陆IP和时间字段就OK了 关闭浏览器或者缓存过期以后自动就删除数据 除了cookie没有其他办法可以保留到本机上了 (IE临时文件夹不算哈,这里假设是网吧上网)
5: 做镜像 (这个问题比较复杂 貌似下载还是要C++多线程才搞的定 电驴迅雷就是最好的例子 HTTP毕竟是无状态协议 文件流也比较得耗资源 用socket 王道)
6:PHPwind是论坛 论坛就是递归处理表的问题而已 没必要搞的这么严谨 
7:把你需要的常量写在类里 命名为common.inc.php 加载到header就OK 或者干脆define()到底 
8:直接写一个bash脚本 调用一个命令行的PHP-cli 插入数据到表 加载到Linux任务列队 运行一万年也不会出错 Java起一个线程 这办法未必好 你这线程不是要一直运行在服务器端吧?那任务多了岂不是资源耗竭了
9:PHP有资深框架 法国人写的symfony 比较复杂 与Java-SSH Python-Zope CMF 属于一个级别的 适合配合EXT-js写企业应用 不过小项目 用个zendframework 或者CI就OK了 英文不好用thinkPHP吧


------解决方案--------------------
接分了!
------解决方案--------------------
学习了。
------解决方案--------------------
不错,接分了
------解决方案--------------------

------解决方案--------------------

------解决方案--------------------

------解决方案--------------------
接分了

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

Video Face Swap

Video Face Swap

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

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
4 weeks 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)

Hot Topics

Java Tutorial
1677
14
PHP Tutorial
1280
29
C# Tutorial
1257
24
What happens if session_start() is called multiple times? What happens if session_start() is called multiple times? Apr 25, 2025 am 12:06 AM

Multiple calls to session_start() will result in warning messages and possible data overwrites. 1) PHP will issue a warning, prompting that the session has been started. 2) It may cause unexpected overwriting of session data. 3) Use session_status() to check the session status to avoid repeated calls.

Composer: Aiding PHP Development Through AI Composer: Aiding PHP Development Through AI Apr 29, 2025 am 12:27 AM

AI can help optimize the use of Composer. Specific methods include: 1. Dependency management optimization: AI analyzes dependencies, recommends the best version combination, and reduces conflicts. 2. Automated code generation: AI generates composer.json files that conform to best practices. 3. Improve code quality: AI detects potential problems, provides optimization suggestions, and improves code quality. These methods are implemented through machine learning and natural language processing technologies to help developers improve efficiency and code quality.

What is the significance of the session_start() function? What is the significance of the session_start() function? May 03, 2025 am 12:18 AM

session_start()iscrucialinPHPformanagingusersessions.1)Itinitiatesanewsessionifnoneexists,2)resumesanexistingsession,and3)setsasessioncookieforcontinuityacrossrequests,enablingapplicationslikeuserauthenticationandpersonalizedcontent.

How to use MySQL functions for data processing and calculation How to use MySQL functions for data processing and calculation Apr 29, 2025 pm 04:21 PM

MySQL functions can be used for data processing and calculation. 1. Basic usage includes string processing, date calculation and mathematical operations. 2. Advanced usage involves combining multiple functions to implement complex operations. 3. Performance optimization requires avoiding the use of functions in the WHERE clause and using GROUPBY and temporary tables.

H5: Key Improvements in HTML5 H5: Key Improvements in HTML5 Apr 28, 2025 am 12:26 AM

HTML5 brings five key improvements: 1. Semantic tags improve code clarity and SEO effects; 2. Multimedia support simplifies video and audio embedding; 3. Form enhancement simplifies verification; 4. Offline and local storage improves user experience; 5. Canvas and graphics functions enhance the visualization of web pages.

Composer: The Package Manager for PHP Developers Composer: The Package Manager for PHP Developers May 02, 2025 am 12:23 AM

Composer is a dependency management tool for PHP, and manages project dependencies through composer.json file. 1) parse composer.json to obtain dependency information; 2) parse dependencies to form a dependency tree; 3) download and install dependencies from Packagist to the vendor directory; 4) generate composer.lock file to lock the dependency version to ensure team consistency and project maintainability.

How to configure the character set and collation rules of MySQL How to configure the character set and collation rules of MySQL Apr 29, 2025 pm 04:06 PM

Methods for configuring character sets and collations in MySQL include: 1. Setting the character sets and collations at the server level: SETNAMES'utf8'; SETCHARACTERSETutf8; SETCOLLATION_CONNECTION='utf8_general_ci'; 2. Create a database that uses specific character sets and collations: CREATEDATABASEexample_dbCHARACTERSETutf8COLLATEutf8_general_ci; 3. Specify character sets and collations when creating a table: CREATETABLEexample_table(idINT

How to use type traits in C? How to use type traits in C? Apr 28, 2025 pm 08:18 PM

typetraits are used in C for compile-time type checking and operation, improving code flexibility and type safety. 1) Type judgment is performed through std::is_integral and std::is_floating_point to achieve efficient type checking and output. 2) Use std::is_trivially_copyable to optimize vector copy and select different copy strategies according to the type. 3) Pay attention to compile-time decision-making, type safety, performance optimization and code complexity. Reasonable use of typetraits can greatly improve code quality.

See all articles