PHP相关外文翻译

合集下载

php近三年参考文献

php近三年参考文献

php近三年参考文献在过去的三年里,PHP作为一种流行的服务器端脚本语言,有许多相关的参考文献涉及到了不同方面的内容。

以下是一些可能对你有帮助的参考文献:1. "PHP 7 Programming Blueprints" by Jose Palala and Martin Helmich 这本书介绍了PHP 7的新特性和最佳实践,涵盖了Web开发、数据库集成、安全性等方面。

2. "Modern PHP: New Features and Good Practices" by Josh Lockhart 这本书详细介绍了PHP的现代开发技术,包括命名空间、自动加载、测试等方面。

3. "PHP Objects, Patterns, and Practice" by Matt Zandstra 这本书讲解了PHP面向对象编程的原理和实践,包括设计模式、SOLID原则等内容。

4. "PHP Web Services: APIs for the Modern Web" by Lorna Jane Mitchell 这本书介绍了如何使用PHP构建和消费Web服务,包括RESTful API、SOAP等方面。

5. "PHP and MySQL Web Development" by Luke Welling and Laura Thomson 这本经典的书籍涵盖了PHP和MySQL的基础知识以及如何构建动态Web应用程序。

6. "PHP Solutions: Dynamic Web Design Made Easy" by David Powers 这本书提供了许多实际的示例和解决方案,帮助读者理解和解决PHP开发中的常见问题。

7. "PHP Cookbook" by David Sklar and Adam Trachtenberg 这本书是一个实用的PHP编程指南,提供了大量的代码示例和解决方案,涵盖了各种PHP应用场景。

php英语单词大全

php英语单词大全

abstract抽象的-挨伯丝拽克特access存取、访问-挨克色丝account账户-厄靠恩特action动作-爱克身activate激活-爱克特维特active活动的-爱克得adapter适配器-厄呆破得address地址-厄拽物丝------------------------------------------------------------------- aggregation 聚合、聚集-爱郭给身algorithm 算法-爱哦哥维则alias 别名-爱力儿丝align 排列、对齐-厄烂allocate 分配、配置-爱了K特allocator分配器、配置器-爱勒K勒annotation 注解、评注-爱(NO)忒身appearance 外观-厄配润丝append 附加-厄喷的application 应用、应用程序-爱破勒K身architecture 架构、体系结构-阿克泰车argument引数(传给函式的值) -阿记门忒--(te一生)array 数组-厄瑞assembly 装配件、配件-三波雷assert(ion) 断言-厄色特assign 赋值-厄撒恩assignment 赋值、分配-厄赛门特associated 相关的、相关联的-厄馊些(dei一生)特asynchronous 异步的- A星克亏那丝atomic 原子的-厄他没课attribute 特性、属性-爱囚伯特audio 音频-奥地哦authorization 授权-啊破瑞贼身echo 输出-爱扣define 规定-(dei一生)饭function 函数-方恩身file 路径-(fai一生)------------------------------------------------------------------------------ background 背景、后台(进程)backup 备份- 白克阿坡bandwidth 带宽-白恩得为丝batch 批处理-拜吃binary 二进制-白牛瑞binding 绑定-白丁bit 位-被特bitmap 位图-bitwise 按位... -被特外资block 块、区块、语句块bookkeeping 簿记boolean 布林值(真假值,true或false)-----['bu:li:?n]border 边框--boxing 装箱、装箱转换---八克星brace 大括号、花括号-伯瑞丝bracket 中括号、方括号--伯{ruai}{K}特breakpoint 断点-背客泡应特bug 臭虫---霸哥build 编连(专指编译和连接-------背喔得bus 总线-------business 业务、商务(看场合) --------背贼内丝buttons 按钮--------霸{ten}byte 位元组(由8 bits组成) ------白特------------------------------------------------------------------------------cache 高速缓存-----凯吃Calculations 推断------卡格雷身丝calendar 日历-------开棱得Calendrical 日历的;根据日历的;历法的;历书上的--------卡伦折扣call 调用callback 回调casting 转型、造型转换----开四特应catalog 目录------开特劳克chain 链-----{chen}四声character 字符------凯瑞克特checkpoint 检查点----拆克泡恩特class 类classification 分类-可辣丝飞K身clause 子句-----可赖资cleanup 清理、清除-----可令阿坡client 客户、客户端-------可来恩特clipboard 剪贴板--克雷特报得Clique最大团-----可里克clone 克隆-------可劳collection 集合---客来客身comment 注释----卡门特commit 提交-----科门特communication 通讯----课谬轮K身compatible 兼容----啃模拍特报compiler 编译器----课模拍乐component组件----卡模抛内特composition 复合、组合----卡破贼身concept 概念----康母色博特concrete具体的-----康科瑞特concurrency 并发、并发机制-----啃卡恩星configuration 配置、组态------啃C个瑞身connection 连接----啃奈课身console 控制台---卡姆馊constant 常量----卡四{den}特:['kɑnst?nt] constraint 约束--啃四追特construct 构件、成分、概念、构造---康丝拽克特constructor构造函数、构造器----啃丝抓克特container 容器---啃忒呢containment包容----啃忒门特context 环境、上下文---康忒丝可特control 控件----啃处Convex Hull凸包----靠维克丝cookie (不译) ---库Kcopy 拷贝cover 覆盖、涵盖----卡窝create/creation 创建、生成----亏A特/亏A身Cryptography密码---亏克掏博瑞飞cube 多维数据集---扣博cursor 光标---克色cursor 游标custom 定制、自定义----卡丝{ten}-------------------------------------------------------------------------------------------- data 数据----{dei}特database 数据库----{dei}特背丝dataset 数据集{dei}特赛特Dictionaries字典--{dei}特身奈瑞丝----------------------------------------------------------------------------------------- efficiency 效率--A飞身Cefficient 高效---A飞身特encapsulation 封装---因看博秀雷身engine 引擎---安针entity 实体-安特{tei}enumeration 枚举--因牛没身enumerators 枚举成员、枚举器equal 相等- 一扩equality 相等性-A靠了{tei}error log 错误日志-爱尔辣的evaluate 评估-A外流为特event 事件-A完特evidence 证据-爱文等死exception 异常-A克赛身exit 退出-爱克C特explicit 显式-A克丝雷C特export 导出-爱克丝报特expression 表达式-A克丝破哇身---------------------------------------------------------------------------------- facility 设施、设备--佛C雷{tei}feature 特性、特征--飞车fetch 提取-{fai}四声吃field length 字段长度-飞儿特烂field 字段-{fiu} 得file 文件-{fai}四声哦filter 筛选--{fiu}特finalization 终结--{fai} 呢雷贼身finalizer 终结器--{fai}呢来则firewall 防火墙--{fai}儿窝firmware 固件-佛母外耳flag 标记-佛来个flush 刷新-佛劳是font 字体form 窗体fragmentation 碎片佛{ruai}个门{tei}身framework 框架-佛瑞母窝克function 函数functionality 功能-方克身奈雷{tei}functor 仿函数-方克特----------------------------------------game 游戏generate 生成-摘呢瑞特generic 泛化的、一般化的、通用的-这奶瑞克genericity 泛型getter (相对于setter)取值函数-该特global object 全局对象-哥楼爆啊破摘克特global 全局的-哥楼爆grant 授权-哥{ruang}特granularity 粒度-哥软牛啦雷忒group 组、群-哥肉破--------------------------------------------------handle 句柄-憨逗handler 处理器-汉德勒hard disk 硬盘hardware 硬件-哈德外耳heap 堆-{hi}一生破hierarchy 层次结构、继承体系-海尔弱{ki}一生hook 钩子-户Khyperlink 超链接-还破另K-------------------------------------------------------------------------------- icon 图标-爱看identifier 标识符-爱得疼{fai}一生物image 图象-a没只implement 实现-因破{len}门特implementation 实现、实现品-因破{len}门特雷{tei}身implicit 隐式-a母破雷森特import 导入-a母泡特index 索引-因带克丝特information 信息-因佛没身infrastructure 基础设施-因佛丝特{rua}克射inheritance 继承、继承机制initialization 初始化initialize 初始化inline 内联instance 实例instantiated 具现化、实体化instantiation 具现体、具现化实体integrate 集成、整合integrity 完整性、一致性interacts 交互interface 接口interoperability 互操作性、互操作能力interpreter 解释器introspection 自省invariants 不变性invoke 调用item 项、条款、项目iterate 迭代iteration 迭代iterative 反复的、迭代的iterator 迭代器------------------------------------------------------------------------------- Kd-Trees线段树key 键---------------------------------------------------------------------------- laser 激光level 阶、层例library 库lifetime 生命期、寿命link 连接、链接linkage 连接、链接linker 连接器、链接器list 列表、表、链表livelock 活锁load 装载、加载loader 装载器、载入器local 局部的lock 锁log 日志login 登录loop 循环lvalue 左值-------------------------------------------------------------------------------- macro 宏maintain 维护manifest 清单manipulator 操纵器marshal 列集Matching匹配member 成员memory 内存menu 菜单message 消息metadata 元数据metaprogramming元编程method 方法micro 微middleware 中间件modeling 建模modem 调制解调器modifier 修饰字、修饰符module 模块mouse 鼠标multiuser 多用户mutable 可变的mutex 互斥元、互斥体------------------------------------------------------------------- namespace 名字空间、命名空间native 原生的、本地的network 网络--------------------------------------------------------------object 对象operand 操作数operation 操作operator 操作符、运算符operator 调用操作符optimizer 优化器option 选项overflow 上限溢位overhead 额外开销overload 重载override 覆写、重载、重新定义--------------------------------------------------------------------- package 包packaging 打包palette 调色板parallel 并行parameterparameter 参数、形式参数、形参parameterize 参数化parent class 父类parentheses 圆括弧、圆括号parse 解析parser 解析器part 零件、部件pattern 模式performance 性能persistence 持久性pixel 像素placeholder 占位符platform 平台pointer 指针poll 轮询polymorphism 多态pooling 池化pop up 弹出式port 端口postfix 后缀precedence 优先序prefix 前缀preprocessor 预处理器print 打印printer 打印机procedural 过程式的、过程化的procedure 过程process 进程profile 评测profiler 效能(性能)评测器program 程序programmer 程序员programming编程、程序设计project 项目、工程property 属性protocol 协议-------------------------------------------------------------------- qualifiedqualifier 修饰符quality 质量queue 队列----------------------------------------------------radian 弧度raise 引发range 范围、区间rank 等级raw 未经处理的readOnly只读record 记录recordset 记录集recursion ——递归recursive 递归refactoring 重构refer 引用、参考reference 引用、参考reflection 反射register 寄存器remote 远程represent 表述,表现resolution 解析过程resolve 解析、决议result set 结果集return 返回revoke 撤销robust 健壮robustness 健壮性routine 例程row 行rowset 行集runtime 执行期、运行期、执行时、运行时rvalue 右值------------------------------------------------------------------------------- Satisfiability可满足性save 保存savepoint 保存点scalable 可伸缩的、可扩展的schedule 调度scheduler 调度程序schema 模式、纲目结构scope 作用域、生存空间screen 屏幕search 查找Searching查找semantics 语义semaphore 信号量serial 串行serialization 序列化server 服务器、服务端session 会话setter 设值函数sibling 同级signature 签名slider滑块slot 槽snapshot 截屏图snapshot 快照software 软件Sorting排序specialization 特化specification 规范、规格splitter 切分窗口stack 栈、堆栈stateless 无状态的statement 语句、声明stream 流string 字符串stub 存根subobject子对象subquery 子查询subroutine 子例程subset 子集subtype 子类型support 支持suspend 挂起symbol 记号syntax 语法------------------------------------------------------------- table 表target 标的,目标template 模板text 文本thread 线程through 通过throw 抛出、引发token 符号、标记、令牌trace 跟踪transaction 事务traverse 遍历Triangulation三角剖分trigger 触发器tupletype 类型---------------------------------------------------------------- unboxing 拆箱、拆箱转换underflow 下限溢位unmarshal 散集unqualified 未经限定的、未经修饰的user 用户---------------------------------------------------------------- variable 变量vector 向量vendor 厂商viable 可行的video 视频view 视图view 视图vowel 元音字母-------------------------------------------------------------------- window 窗口wizard 向导word 单词wrapper 包装、包装器----------------------------------------------------------。

php毕业设计外文翻译--通过PHP访问MySQL

php毕业设计外文翻译--通过PHP访问MySQL

php毕业设计外文翻译--通过PHP访问MySQLGetting PHP to Talk to MySQLOnce you are familiar with using MySQL client tools to manipulate data in the database。

you can start using PHP to display and modify data from the database。

PHP has standard ns for working with databases。

In this article。

we will discuss PHP's built-in database ns and how to use the PHP n and n Repository (PEAR) database.PHP'XXXPHP has several built-in XXX are easy to use and allow you to connect to a database。

execute queries。

and retrieve data。

Some of the most commonly used XXX:mysqli_connect() - This n is used to connect to a MySQL database.mysqli_query() - This n is used to execute a query on the database.mysqli_fetch_array() - This n is used to retrieve data from a query result.Using PEAR DatabasePEAR is a repository of PHP ns and ns。

It includes a database package that provides a set of classes for working with databases。

php是什么意思

php是什么意思

php是什么意思
PHP是超文本预处理器的英文字母的缩写形式(Hypertext Preprocessor),是一种被广泛应用的开放源代码的多用途脚本语言,它可嵌入到HTML中,尤其适合web开发。

作为全球最美、入门最快、应用最广泛的开发语言,PHP 主要用于web前端开发领域,是服务器端知行的嵌入式HTML 文档的脚本语言。

其独特的语法混合了C、Java、Perl以及PHP 自创的一些语法,能快速的执行动态网页。

用大白话来讲,就是说PHP是一种开发语言,属于IT编程技术中的一门语言,就像是我们学的英语。

但是这种语言是人与计算机进行交流的工具,通过这种语言可以告诉计算机我们应该如何去做来实现某种功能或者目的。

php英文翻译

php英文翻译

毕业设计(论文)外文参考资料及译文译文题目:PHP Development HistoryPHP development history—from《Programming PHP》By: ERIC Within the last few years, PHP has grown to be the most widespread web platform in the world, operational in more than a third of the web servers across the globe. PHP's growth is not only quantitative but also qualitative. More and more companies, including Fortune companies, rely on PHP to run their business-critical applications, which creates new jobs and increases the demand for PHP developers. Version 5, due to be released in the very near future, holds an even greater promise.While the complexity of starting off with PHP remains unchanged and very low, the features offered by PHP today enable developers to reach far beyond simple HTML applications. The revised object model allows for large-scale projects to be written efficiently, using standard object-oriented methodologies. New XML support makes PHP the best language available for processing XML and, coupled with new SOAP support, an ideal platform for creating and using Web Services.Many years ago, when Rasmus Lerdorf first started developing PHP/FI. He could not have imagined that his creation would eventually lead to the development of PHP as we know it today, which is being used by millions of people. The first version of “PHP/FI,” called Personal Homepage Tools/Form Interpreter, was a collection of Perl scripts in 1995.One of the basic features was a Perl-like language for handling form submissions, but it lacked many common useful language features, such as for loops.A rewrite came with PHP/FI 2 in 1997, but at that time the development was almost solely handled by Rasmus. After its release in November of that year, Andi Gutmans and Zeev Suraski bumped into PHP/FI while looking for a language to develop an e-commerce solution as a university project.They discovered that PHP/FI was not quite as powerful as it seemed, and its language was lacking many common features. One of the most interesting aspects included the way while loops were implemented. The hand-crafted lexical scanner would go through the script and when it hit the while keyword it would remember itsposition in the file. At the end of the loop, the sought back to the saved position, and the whole loop was reread and re-executed.Zeev and Andi decided to completely rewrite the scripting language. They then teamed up with Rasmus to release PHP 3, and along also came a new name: PHP:Hypertext Preprocessor, to emphasize that PHP was a different product and not only suitable for personal use. Zeev and Andi had also designed and implemented a new extension API. This new API made it possible to easily support additional extensions for performing tasks such as accessing databases, spell checkers and other technologies, which attracted many developers who were not part of the ”core” group to join and contribute to the PHP project. At the time of PHP 3’s release in June 1998, the estimated PHP installed base consisted of about 50,000 domains. PHP 3 sparked the beginning of PHP’s real breakthrough, and was the first version to have an installed base of more than one million domainsIn late 1998, Zeev and Andi looked back at their work in PHP 3 and felt they could have written the scripting language even better, so they started yet another rewrite. While PHP 3 still continuously parsed the scripts while executing them, PHP 4 came with a new paradigm of “compile first, execute later.” The compilation step does not compile PHP scripts into machine code; it instead compiles them into byte code, which is then executed by the Zend Engine(Zend stands for Zeev & Andi), the new heart of PHP 4. Because of this new way of executing scripts, the performance of PHP 4 was much better than that of PHP 3, with only a small amount of backward compatibility breakage.Among other improvements was an improved extension API for better run-time performance, a web server abstraction layer allowing PHP 4 to run on most popular web servers, and lots more. PHP 4 was officially released on May 22, 2002,and today its installed base has surpassed 15 million domains.In PHP 3, the minor version number (the middle digit) was never used, and all versions were numbered as 3.0.x. This changed in PHP 4, and the minor version number was used to denote important changes in the language. The first important change came in PHP 4.1.0,which introduced superglobals ,such as $_GET and $_POST. Superglobals can be accessed from within functions without having to usethe global keyword. This feature was added in order to allow the register_globals INI option to be turned off. register_globals is a feature in PHP which automatically converts input variables like "?foo=bar" in to a PHP variable called $foo. Because many people do not check input variables properly, many applications had security holes, which made it quite easy to circumvent security and authentication code. With the new superglobals in place, on April 22, 2002, PHP 4.2.0 was released with the register_globals turned off by default. PHP 4.3.0, the last significant PHP 4 version, was released on December 27, 2002. This version introduced the Command Line Interface(CLI), a revamped network I/O layer (called streams), and a bundled GD library. Although most of those additions have no real effect on end users, the major version was bumped due to the major changes in PHP’s core.Soon after, the demand for more common object-oriented features increased immensely, and Andi came up with the idea of rewriting the objected-oriented part of the Zend Engine. Zeev and Andi wrote the “Zend Engine II: Feature Overview and Design” document and jumpstarted heated discussions about PHP’s future. Although the basic language has stayed the same, many features were added, dropped, and changed by the time PHP 5 matured. For example, namespaces and multiple inheritance, which were mentioned in the original document, never made it into PHP 5. Multiple inheritance was dropped in favor of interfaces, and namespaces were dropped completely. You can find a full list of new features in Chapter, “What Is New in PHP 5?”PHP 5 is expected to maintain and even increase PHP’s leadership in the web development market. Not only does it revolutionizes PHP’s object-oriented support but it also contains many new features which make it the ultimate web development platform. The rewritten XML functionality in PHP 5 puts it on par with other web technologies in some areas and overtakes them in others, especially due to the new SimpleXML extension which makes it ridiculously easy to manipulate XML documents. In addition, the new SOAP, MySQLi, and variety of other extensions are significant milestones in PHP’s support for additional technologies.As of April 2007, over 20 million Internet domains were hosted on servers with PHP installed, and PHP was recorded as the most popular Apache module. Significant websites are written in PHP including the user-facing portion of Facebook, Wikipedia , PHP can be used to create stand-alone, compiled applications and libraries, it can be used for shell scripting, and the PHP binaries can be called from the command line.As with many scripting languages, PHP scripts are normally kept as human-readable source code, even on production web servers. In this case, PHP scripts will be compiled at runtime by the PHP engine, which increases their execution time. PHP scripts are able to be compiled before runtime using PHP compilers as with other programming languages such as C (the language PHP and its extensions are written in).Code optimizers aim to reduce the computational complexity of the compiled code by reducing its size and making other changes that can reduce the execution time with the overall goal of improving performance. The nature of the PHP compiler is such that there are often opportunities for code optimization, and an example of a code optimizer is the Zend Optimizer PHP extension.Another approach for reducing overhead for high load PHP servers is using PHP accelerators. These can offer significant performance gains by caching the compiled form of a PHP script in shared memory to avoid the overhead of parsing and compiling the code every time the script runs.The National Vulnerability Database stores all vulnerabilities found in computer software. The overall proportion of PHP-related vulnerabilities on the database amounted to: 12% in 2003, 20% in 2004, 28% in 2005, 43% in 2006, 36% in 2007, and 35% in 2008. Most of these PHP-related vulnerabilities can be exploited remotely: they allow hackers to steal or destroy data from data sources linked to the webserver (such as an SQL database), send spam or contribute to DOS attacks using malware, which itself can be installed on the vulnerable servers.These vulnerabilities are caused mostly by not following best practice programming rules: technical security flaws of the language itself or of its corelibraries are not frequent. Recognizing that programmers cannot be trusted, some languages include taint checking to detect automatically the lack of input validation which induces many issues. Such a feature is being developed for PHP. Although it may be included in mainstream PHP in a future release, its inclusion has been rejected several times in the past.Hosting PHP applications on a server requires a careful and constant attention to deal with these security risks. There are advanced protection patches such as Suhosin and Hardening-Patch, especially designed for web hosting environments. Installing PHP as a CGI binary rather than as an Apache module is the preferred method for added security.With respect to securing the code itself, PHP code can be obfuscated to make it difficult to read while remaining functional.Syntax-highlighted PHP code embedded within HTMLPHP only parses code within its delimiters. Anything outside its delimiters is sent directly to the output and is not parsed by PHP. The most common delimiters are <?php and ?>, which are open and close delimiters respectively. <script language="php"> and </script> delimiters are also available. Short tags can be used to start PHP code, <? or <?= (which is used to echo back a string or variable) and the tag to end PHP code, ?>. These tags are commonly used, but like ASP-style tags (<% or <%= and %>), they are less portable as they can be disabled in the PHP configuration. For this reason, the use of short tags and ASP-style tags is discouraged. The purpose of these delimiters is to separate PHP code from non-PHP code, including HTML.PHP发展史—摘自《PHP程序设计》作者:艾瑞克在最近的几年里,PHP已经发展成为世界上最为流行的Web平台,它运行在全球超过三分之一的Web服务器。

PHP基础语言外文翻译文献

PHP基础语言外文翻译文献

PHP基础语言外文翻译文献(文档含中英文对照即英文原文和中文翻译)原文:PHP Language BasicsActive Server Pages (PHP) is a proven, well-established technology for building dynamic Web applications, which provides the power and flexibility you need to create anything from a personal, Web based photo gallery to a complete catalogue and shopping cart system for your next eCommerce project。

One unique feature of PHP is that it lets you chooseyour favourite scripting language, be it JavaScript or PHP ; however, PHP is by far the most popular choice. In this article, I'll bring you up to speed on the basic syntax of the PHP language, including variables, operators, and control structures.This article is the second in a series teaching PHP. Specifically, the goal of this series is to teach you all you need to know to create dynamic Web sites using PHP. This article picks up right where the previous article in the series, Getting Started with PHP, left off.VariablesHere is the listing for the first PHP script I helped you create in the previous article:1 <html>2 <head>3 <title> My First PHP Page </title>4 </head>5 <body>6 <?php7 ' Write out a simple HTML paragraph8 Echo "<p>This is a test of PHP.</p>"9 ?>10 </body>11 </html>As I admitted in that article, this is a pretty uninteresting example of an PHP script. When it comes right down to it, this script doesn't do anything a plain, old HTML page couldn't do. Oh sure, I gave a slightly more interesting example that displayed the current server time, but to be really useful a script needs to perform some form of calculation, or manipulate dynamic information to present it in some interesting way.The language used for writing most PHP programs, and which I'll be using throughout this series, is called PHP . Like most programming languages, PHP lets you store data in variables. A variable may be thought of simply as a named location in memory where data may be stored. PHP is what is known as a loosely typed language, which means that a particular variable may store any kind of information, be it a number, a piece of text, a date, or some more complicated chunk of data (as opposed to strictly typed languages where you can only store one kind of information in each variable). Before you can use a variable, though, you must declare it; that is, you must let PHP know that you want to create a variable with a particular name.Let's look at a basic example to help solidify these concepts in your mind. Say you were writing a Web page that performed conversions between Celsius and Fahrenheit temperatures. In countries where Celsius is used, 20&deg;C is commonly accepted as the value for room temperature. The following code creates a variable called intRoomTempC,and then assigns it a value of 20:New Revised 2nd Edition Out NOW!"Build Your Own Database Driven Website Using PHP & MySQL"Fully updated for PHP 4.3.Installation instructions for Mac OS XFull index providedNew wider book sizeEnhanced fontsNew cover designLay-flat spineAll content revisitedDownload the First 4 Chapters FREETell me more about this top-selling book.$ intRoomTempC ' Create a variableintRoomTempC = 20 ' Assign the variable a value of 20The keyword $ in the above is short for $ension, and is used to tell PHP to create a variable with the name specified (in this case, intRoomTempC). Why '$ension', you ask? I agree, it's not the most obvious choice, but basically it refers to what you're asking PHP to do. When creating a variable, PHP needs to assign some space in memory to store whatever value(s) will be placed in the variable, and part of thattask is to figure out the size ($ension) of the space that needs to be allocated. In any case, creating a variable is as simple as typing $ followed by the name of the variable.The second line of the above example assigns a value to the variable that was just created; specifically, it stores the number 20 in the variable. The equals sign (=) is called the assignment operator because it is used to assign values to variables. During the course of this article, you'll meet many other operators that do other weird and wonderful things to variables and the values they store.You should always create a variable before assigning it a value, and you'll usually want to assign the variable a value before putting it to use. Trying to assign a value to a variable that does not exist, however, will cause PHP to automatically create a new variable with the given name. This is called implicit declaration, because a new variable is declared implicitly as a result of your trying to assign a value to a variable that doesn't exist. Since you are free to use implicit declaration for all of your variables, you may be wondering what the point is of using the $ command to create each and every variable by hand.The answer has to do with how easy you want it to be to find typing mistakes in your code. PHP provides another command, Option Explicit, which causes PHP to disallow implicit declarations and instead display an error message whenever you try to assign a value to a non-existentvariable. Why would you want this to happen? Consider the following example:$ intRoomTempC ' Create a variableintRomTempC = 20 ' Assign the variable a value of 20If you have a keen eye, you may have noticed that the variable name is misspelled on the second line. This is the kind of mistake that even experienced programmers make all the time. With implicit declaration enabled, the second line will create another new variable called intRomTempC and will store the value in that variable instead. Now, if the rest of your script expects that value to be stored in intRoomTempC, you're going to run into trouble. In a large script, tracing such a problem back to one little typing mistake can be very time consuming. That's where Option Explicit comes in:Option Explicit ' Disable implicit declaration$ intRoomTempC ' Create a variableintRomTempC = 20 ' Assign the variable a value of 20This time, PHP will report the typing mistake as an illegal implicit declaration, displaying an error message to that effect with the exact line number where the typing mistake was made. For this reason, I tend to explicitly declare all my variables with $ and specify Option Explicit on the first line of all of my PHP scripts. It might take slightly longer to type,but it saves a lot of headaches when something goes wrong.A shortcut exists for creating several variables at once on the same line. For instance, the following line would create two variables, intRoomTempC, and intFreezingC:$ intRoomTempC, intFreezingC ' Two variables in one lineBy now you may be wondering about my naming convention for variables. The two variables created in the above snippet both begin with int. I'm using this prefix to indicate that these variables will contain integers (whole numbers). You can feel free to name your variables whatever you like and store whatever kind of data you like in them, but I prefer to use this convention as a helpful reminder of the type of information in each variable. This practice of prefixing variable names with a clue as to their type is known as Hungarian notation, and I'll introduce additional prefixes for other data types as they arise over the course of this series.The Web has grown beyond the point where an online brochure will satisfy a typical company's needs for its Web presence. If you aim to market yourself as a Webmaster these days, you need to have some skill building online applications –Web sites that users can interact with, whether to get something done (e.g. send email), get information targeted to their specific needs (e.g. a real-time stock quote), or to interact with other users (e.g. an online community).In this series of articles, I’ll guide you through the process of learning one of the most popular frameworks for creating dynamic Web sites such as these –Active Server Pages (PHP). If you can secure a strong knowledge of PHP, as well as some practical experience building Web sites with it, you should never have trouble getting work as a Web developer. A quick search of your favourite online job directory with the keyword 'PHP' should be more than enough to convince you of that.In this first article, I'll help you get your feet wet by introducing the PHP programming language, and how to use it to write dynamic Web pages with PHP. Before I get to that, I shall stop to explain how server-side scripting, and PHP in particular, differs from other Web scripting technologies that you may be familiar with, such as client-side JavaScript. This will get you armed with the proper vocabulary and ensure that we're on the same page before launching headlong into the brave, new world of PHP.Server-Side ScriptingTo understand where PHP fits into the big picture of Web development, you need to understand the concept of a server-side scripting language. If you've programmed Web pages in Perl, PHP, JSP, or Cold Fusion before, you can safely skip this section –all of those are server-side scripting languages, and PHP works in much the same way. If you're coming to PHP armed only with knowledge of HTML (andperhaps with some CSS and/or JavaScript experience) then you'll find that server-side scripting is quite a bit different.Let me begin by giving you a quick review of how standard, non-PHP Web pages work. As shown in Figure 1, the Web browser on the client computer (the computer belonging to the user) makes a request for a page, say file.html (1). Assuming the requested file exists on the Web host computer where the Web Server software can find it, that software replies to the request by sending the file back to the browser (2). Any additional files (images, for example) required to display the page are requested and received in the same way. The protocol used for this exchange, and indeed for all communication between Web browsers and Web servers is called Hypertext Transfer Protocol (HTTP).If you've ever used any JavaScript in your pages, you know that the requested Web page (file.html) can contain, in addition to plain HTML code, small programs written in JavaScript. These programs, or scripts, are read and executed by the Web browser while the page is displayed in the browser. So the Web browser must understand not only how to read HTML and display textand images, but it must also be able to run JavaScript programs appearing inside Web pages. This arrangement, where the Web browser runs the script after receiving it from the Web server, is called client-side scripting. The name makes sense –all of the script runs on the client-side –theright-hand side of Figure 1. The Web server is completely oblivious to whether the file it is sending contains a script or not; it’s all up to the browser (the client) to handle execution of the script.PHP fits into a different category of technologies, called server-side scripting, where it is no longer the browser running on the client that is responsible for running the script; instead, it is the Web server that runs the script. This process is illustrated in Figure 2. As before, the Web browser requests a file (1). In this case, however, the filename ends with .php (file.php, for example), branding it as a file containing an PHP script that needs to be processed by the server. The server recognizes this, and instead of directly sending the requested file back to the browser, it sends the file to the PHP scripting engine (2). The engine is a component of the Web server software that can interpret PHP scripts and output the results as HTML. The trick here is that any given script can output different HTML each time it is run, so what comes out of the PHP engine can be different for each client (browser) request. That dynamically generated page is then sent to the browser in response to its request (3), in exactly the same way as the static page was sent in the previous example. Just as when the page contained client-side JavaScript and the server was completely unaware of this fact, when the page contains server-side PHP script, the browser does not know this at all. The PHP code contained in the page is interpreted and converted to plain HTML by the PHP enginebefore the browser gets to see it; so as far as the browser is concerned an PHP page looks just like any normal Web page. All the work is done on the server-side; thus the name, server-side scripting.翻译:PHP基础语言PHP是构建动态网页应用的被实践证明了的技术,为你需要创建任何的东西从一个基于图片库个人网页到一个完整的目录,为你的下一个商业项目提供全面的系统提供了强大的功能和灵活性。

php英语单词,php常用英语单词

php英语单词,php常用英语单词

第 2 页 共 49 页
本教程配合有视频讲解,如果您只看到了本教程,没有得到视频讲解,请登陆:/下载,谢谢。
四年专业英语单词快速记忆经验,一年时间精心打造“编程语言快速记忆手册”为您倾情奉献:
/
bug 臭虫 build 编连(专指编译和连接 bus 总线 business 业务、商务(看场合) buttons 按钮 byte 位元组(由 8 bits 组成) cache 高速缓存 Calculations calendar 日历 Calendrical call 调用 callback 回调 casting 转型、造型转换 catalog 目录 chain 链 character 字符 checkpoint 检查点 class 类 classification 分类 clause 子句 cleanup 清理、清除 client 客户、客户端 clipboard 剪贴板 Clique 最大团 clone 克隆 collection 集合
四年专业英语单词快速记忆经验,一年时间精心打造“编程语言快速记忆手册”为您倾情奉献:
/
php 英语单词,php 常用英语单词,快速学习 php 编程语言!
php 英语单词,php 常用英语单词,帮助您快速学习 php 编程语言!掌握了 php 里面所涉及到的所有英语单词,能更好的帮助您快速理解 php 编程语言,让您 学习 php 编程语言的速度快人十倍。 abstract 抽象的 access 存取、访问 account 账户 action 动作 activate 激活 active 活动的 adapter 适配器 address 地址 aggregation 聚合、聚集 algorithm 算法 alias 别名 align 排列、对齐 allocate 分配、配置 allocator 分配器、配置器 annotation 注解、评注 appearance 外观 append 附加 application 应用、应用程序 architecture 架构、体系结构 argument 引数(传给函式的值) array 数组 assembly 装配件、配件

php 英文单词补全

php 英文单词补全

php 英文单词补全English answer:PHP (Hypertext Preprocessor) is a widely-used open-source general-purpose scripting language that isespecially suited for web development. It was originally created by Rasmus Lerdorf in 1994, and has since become one of the most popular programming languages in the world. PHP is a server-side scripting language, which means that it is executed on the server before the page is sent to the client. This makes it ideal for creating dynamic web pages that can interact with databases and other resources on the server.PHP is a very versatile language that can be used for a wide variety of tasks, including:Web development.Content management systems.E-commerce.Social networking.Data analysis.Machine learning.PHP is a very popular language for web development because it is easy to learn, has a large community of users, and is supported by a wide range of frameworks and tools. Some of the most popular PHP frameworks include:Laravel.CodeIgniter.Symfony.Zend Framework.PHP is also a very versatile language that can be used for a wide variety of tasks beyond web development. For example, it can be used for data analysis, machine learning, and even game development.Here are some of the advantages of using PHP:Easy to learn: PHP is a very easy language to learn, even for beginners. It has a simple syntax and a large community of users who can provide support.Versatile: PHP can be used for a wide variety of tasks, including web development, data analysis, machine learning, and even game development.Open source: PHP is an open-source language, which means that it is free to use and distribute.Community support: PHP has a large community of users who can provide support and resources.Here are some of the disadvantages of using PHP:Security: PHP can be vulnerable to security attacks,so it is important to use it carefully and follow best practices.Performance: PHP can be slower than some other languages, so it is important to optimize your code.Lack of type safety: PHP is not a type-safe language, which can lead to errors and bugs.Overall, PHP is a very versatile and powerful language that is ideal for web development and a wide range of other tasks. It is easy to learn, has a large community of users, and is supported by a wide range of frameworks and tools.中文回答:PHP(超文本预处理器)是一种广泛使用的开源通用脚本语言,特别适用于 Web 开发。

PHP涉及单词(基础必备)

PHP涉及单词(基础必备)

单词总汇:Linux部分:Forbidden 被禁止的;严禁的,禁用的Mkdir 建立一个新的子目录Rmdir 删除一个目录Copy 复制Touch 接触;触动;Unlink 删除一个文件More 更多;此外查看Find 发现;认为查找Type 类型User 用户Group 群的;团体的Size 大小;尺寸Tar 打包Vi 编译器HTML部分head:头title:标题body:身体,引申为页面主体background:背景width:宽height:高color:颜色font:字体align:对齐方式image:图像超级链接和列表border:边框,边界top:顶部middle:中间,一般用于垂直居中center:中央,一般用于水平居中bottom:底部left:左right:右link:链接scrolldelay:scroll delay 滚动延迟direction:方向decoration:装饰、装潢,text-decoration表示为超链接的下划线样式table:桌子,计算机英语中引申为表格caption:标题row:行column:列rowspan:row span 行跨度colspan:column span 列跨度align:使成一线,引申为水平对齐方式valign:verticalalign 垂直对齐方式cellspacing:cellspace 单元格间距cellpadding:cellpadding 单元格内部填充表单form:组成、结构、形式,引申为表单action:行动,引申为表单提交的动作method:方法target:目标post:邮局、邮寄,HTML中指表单提交的方式get:HTML中指表单提交的方式blank:空白的HTML中表示新浏览器窗口input:输入HTML中表示一个表单的输入域type:类型button:按钮checkbox:检验盒,引申为复选框radio:收音机、无线电设备,引申为单选按钮hidden:隐藏password:密码text:文本,正文,引申为单行文本框submit:提交reset:重置select:选择,引申为下拉列表option:选项,引申为下拉列表中的某一项textarea:文本域,不同于text,文本框是多行的文本框checked:被确认的selected:被选中的disabled:被禁用的value:值size:大小,尺码,引申为表单域的宽度label:标签readonly:read only 只读maxlength:max length 最大长度multiple:多个的multipart/form-data:表单的一种编码方式frameset:框架支架,引申为框架集页面,作用是将浏览器窗口分为若干个框架frame:框架frameborder:框架的边框粗细bordercolor:边框的颜色noresize:不允许调整大小scrolling:滚动HTML中表示框架中是否出现滚动条DIV+CSS部分1.(盒子)布局排版类float - 浮动:设置块元素的浮动效果。

PHP访问MySQL(毕业设计外文翻译)

PHP访问MySQL(毕业设计外文翻译)

“logo XX学院XX UNIVERSITY毕业论文(设计)外文翻译翻译题目:通过PHP访问MySQL _英文题目:Getting PHP to Talk to MySQL姓名__________________学号__________________专业班级__________________指导教师__________________提交日期__________________教务处制通过PHP访问MySQL译文:现在你已经可以熟练地使用MySQL客户端软件来操作数据库里的数据,我们也可以开始学习如何使用PHP来显示和修改数据库里的数据了。

PHP有标准的函数用来操作数据库。

我们首先学习PHP内建的数据库函数,然后会学习PHP扩展和应用程序库(PEAR,PHP Extension and Application Repository )中的数据库函数,我们可以使用这些函数操作所有支持的数据库。

这种灵活性源自于抽象。

对于编程接口而言,抽象简化了复杂的交互过程。

它将交互过程中无关紧要的部分屏蔽起来,让你关注于重要的部分。

PEAR的DB类就是这样一种数据库接口的抽象。

你登录一个数据库所需要提供的信息被减少到最少。

这种标准的格式可以通过同一个函数来访问MySQL以及其他的数据库。

同样,一些MySQL特定的函数被更一般的、可以用在很多数据库上的函数所替代。

比如,MySQL特定的连接函数是: mysql_connect($db_host, $db_username, $db_password);而PEAR的DB提供的连接函数是:$connection =DB::connect("mysql://$db_username:$db_password@$db_host/$db_database" );两个命令都提供了同样的基本信息,但是PEAR的函数中还指定了要连接的数据库的类型。

你可以连接到MySQL或者其他支持的数据库。

外文翻译---通过PHP访问MySQL

外文翻译---通过PHP访问MySQL

科技外文文献Getting PHP to Talk to MySQLNow that you’re comfortable using the MySQL client tools to manipulate data in the database, you can begin using PHP to display and modify data from the database. PHP has standard functions for working with the database.First, we’re going to discuss PHP’s built-in database functions. We’ll also show you how to use the The PHP Extension and Application Repository (PEAR) database functions that provide the ability to use the same functions to access any supported database. This type of abstraction. In programming interfaces, abstraction simplifies a complex flexibility comes from a process called interaction. It works by parts. PEAR’s DB removing any nonessential parts of the interaction, allowing you to concentrate on the important classes are one such database interface abstraction. The information you need to log into a database is reduced to the bare minimum. This standard format allows you to interact with MySQL, as well as other databases using the same functions. Similarly, other MySQL-specific functions are replaced with generic ones that know how to talk to many databases. For example, the MySQL-specific connect function is: mysql_connect($db_host, $db_username, $db_password); versus PEAR’s DB connect functio n: $connection = DB::connect("mysql://$db_username:$db_password@$db_host/$db_database"); The same basic information is present in both commands, but the PEAR function also specifies the type of databases to which to connect. You can connect to MySQL or other supported databases. We’ll discuss both connection methods in detail. In this chapter, you’ll learn how to connect to a MySQL server fromPHP, how to use PHP to access and retrieve stored data, and how to correctly display information to the user. The ProcessThe basic steps of performing a query, whether using the mysql command-line tool or PHP, are the same: • Connect to the database.• Select the database to use.• Build a SELECT statement.• Perform the query.• Display the results.We’ll walk through each of these steps for both plain PHP and PEAR functions. ResourcesWhen connecting to a MySQL database, you will use two new resources. The first is the link identifier that holds all of the information necessary to connect to the database for an active connection. The other resource is the results resource. It contains all information required to retrieve results from an active database query’s result set. You’ll be creating and assigning both resources in this chapter.Querying the Database with PHP FunctionsIn this section, we introduce how to connect to a MySQL database with PHP. It’s quite simple, and we’ll begin shortly with examples, but we should talk briefly about what actually happens. When you try connecting to a MySQL database, the MySQL server authenticates you based on your username and password. PHP handles connecting to the database for you, and it allows you to start performing queries and gathering data immediately.  the database: As in Chapter 8, we’ll need the same pieces of information to connect to• The IP address of the database server• The name of the database• The username• The passwordBefore moving on, make sure you can log into your database using the MySQL command-line client. Figure 9-1 shows how the steps of the database interaction relate to the two types of resources. Building the SELECT statement happens before the third function call, but it is not shown. It’s done with plain PHP code, not a MySQL-specific PHP function. Figure 9-1. The interaction between functions and resources when using the databaseIncluding Database Login DetailsYou’re going to create a file to hold the information for logging into MySQL. Storing this information in a file you include is recommended. If you change the database password, there is only one place that you need to change it, regardless of how many PHP files you have that access the database. You don’t have to worry about anyone directly viewing the file and getting your database login details. The file, if requested by itself, is processed as a PHP file and returns a blank page. Let’s call this file db_login.php and place it in the same directory as your other PHP files. The file is represented in Example 9-1. Example 9-1. A template for setting database login settings<?php $db_host='hostname of database server'; $db_database='database name'; $db_username='username'; $db_password='password'; > In Example 9-2, we create this file to use a database on the same machine as the web server. We assign it a database name, username, and password. <?php $db_host='localhost'; $db_database='test'; $db_username='test'; $db_password='yourpass'; > Figure 9-2 illustrates how you’re going to use this file with other PHP files. You’regoing to continue using the database that you started to set up in Chapter 7. Figure 9-2. Reusing the login details in multiple filesExample 9-3. The SQL to recreate the test objects (continued)DROP TABLE IF EXISTS books; CREATE TABLE books ( title_id int(11) NOT NULL auto_increment, title varchar(150) default NULL, pages int(11) default NULL, PRIMARY KEY (title_id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table books -- INSERT INTO books V ALUES (1,'Linux in a Nutshell',476),(2,'Classic Shell Scripting',256); -- -- Table structure for table purchases -- DROP TABLE IF EXISTS purchases; CREATE TABLE purchases ( id int(11) NOT NULL auto_increment, user varchar(10) default NULL, title varchar(150) default NULL, day date default NULL, PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table purchases -- LOCK TABLES purchases WRITE; INSERT INTO purchases V ALUES (1,'Mdavis','Regular Expression Pocket Reference','2005-02-15'),(2,'Mdavis','JavaScript & DHTML Cookbook','2005-02-10'); backup.sql and run from the -3 can be saved as If you didn’t create the tables in Chapter 8, the code in Example 9command prompt with the following syntax:  mysql -u username -p password -D database_name <backup_file_name.sqlUsing the values from the examples, it becomes: mysql -u test -pyourpass -D test < backup.sql The database is called test, and it consists of three tables called books, authors, and purchases. Each table has a few sample rows. That’s enough to get us started querying from PHP.Connecting to the DatabaseThe first thing you need to do is connect to the database and check to make sure there’s a connection. Including the file that you set up to store your connection information allows you to use the variables instead of hardcoded 4. We’re assembling one file, values when you call the mysql_connect function, as shown in Example 9-db_test.php, by adding these code snippets. Example 9-4. Including the connection values and calling mysql_connect in db_test.php// Include our login information include('db_login.php'); // Connect $connection = mysql_connect($db_host, $db_username, $db_password); if (!$connection){ die ("Could not connect to the database: <br />". mysql_error( )); } The mysql_connect function takes the database host, username, and password as parameters. If the connection is successful, a link to a database is returned. FALSE is returned if a connection can’t be made. Check the return value from the function to make sure there’s a connection. If there’s a problem, such as an incorrec t password, print out a polite warning and the reason for the error using mysql_error. Instead of simply echoing an error message, die( ) displays the error and stops the program. Not being able to access the database makes most database-driven pages fairly useless and prevents the user from seeing numerous errors. Notice that we didn’t specify the database name yet.Troubleshooting connection errorsOne error you may get is: Fatal error: Call to undefined function mysql_connect( ) in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\db_test.php on line 4 This error occurs because PHP 5.x for Windows was downloaded, and MySQL support was not included by default. To fix this error, copy the php_mysql.dll file from the ext/ directory of the PHP ZIP file to C:\php , and then C:\WINDOWS\php.ini . Make sure there are two lines that are not commented out by a semicolon (;) at the beginning of the line like these: extension_dir = "c:/PHP/ext/" extension=php_mysql.dll This will change the extension to include the directory to C:/php and include the MySQL extension, respectively. You can use the Search function of your text editor to check whether the lines are already there and just need to be uncommented, or whether they need to be added completely. You’ll need to restart Apache, and then MySQL support will be enabled.Selecting the DatabaseNow that you’re connected, the next step is to select which database to use with the mysql_select_db command. It takes two param eters: the database name and, optionally, the database connection. If you don’t specify the database connection, the default is the connection from the last mysql_connect: // Select the database $db_select=mysql_select_db($db_database); if (!$db_select) { die ("Could not select the database: <br />". mysql_error( )); } Again, it’s good practice to check for an error and display it every time you access the database.While it’s possible to call mysql_select_db multiple times within the same script, it’s not considered good practice. Now that you’ve got a good database connection, you’re ready to execute your SQL query.Building the SQL SELECT QueryBuilding a SQL query is as easy as setting a variable to the string that is your SQL query. Of course, you’l l need to use a valid SQL query, or MySQL returns with an error when you execute the query. The variable name $query is used since the name reflects its purpose, but you can choose anything you’d like for a variable name. The SQL query in this example is SELECT * FROM books. Unlike when you used the mysql command-line client, the query does not have a semicolon at the end. You can build up your query in parts using the string concatenate (.) operator: // Assign the query $select = ' SELECT '; $column = ' * '; $from = ' FROM '; $tables = ' books '; $where = ' NATURAL JOIN authors'; $query = $select.$column.$from.$tables.$where; This code is a more flexible version of the following: // Assign the query $query = "SELECT * FROM books NATURAL JOIN authors"; The query string could also use a variable in the WHERE clause to limit which rows are returned based on user information or another query. Now that you have your query assigned to a variable, you can execute it. Executing the Query—the query and, To have the database execute the query, use the mysql_query function. It takes two parametersoptionally, the database link—and returns the result. Save a link to the results in a variable called, you guessed it, $result! This is also a good place to check the return code from mysql_query to make sure that there were no errors in the query string or the database connection by verifying that $result is not FALSE: // Execute the query $result = mysql_query( $query ); if (!$result){ die ("Could not query the database: <br />". mysql_error( )); } When the database executes the query, all of the results forma result set. These results correspond to the rows that you saw upon doing a query using the mysql command-line client. To display them, you process each row, one at a time. Fetching and DisplayingUse mysql_fetch_row to get the rows from the result set. Its syntax is: array mysql_fetch_row ( resource $result); It takes the result you stored in $result fromthe query as a parameter. It returns one row at a time from the query until there are no more rows, and then it returns FALSE. Therefore, you do a loop on the result of mysql_fetch_row and define some code to display each row: // Fetch and display the results while ($result_row = mysql_fetch_row(($result))){ echo 'Title: '.$result_row[1] . '<br />'; echo 'Author: '.$result_row[4] . '<br /> '; echo 'Pages: '.$result_row[2] . '<br /><br />'; } The columns of the result row are stored in the array and can be accessed one at a time. The variable $result_row[2] accesses the second attribute (as defined in the query’s column order or the column order of the table if SELECT * is used) in the result row. Fetch typesThis is not the only way to fetch the results. Using mysql_fetch_array, PHP can place the results into an array in one step. It takes a result as its first parameter, and the way to bind the results as an optional second parameter. If MYSQL_ASSOC is specified, the results are indexed in an array based on their column names in the query. If MYSQL_NUM is specified, then the number starting at zero accesses the results. The default value, MYSQL_BOTH, returns a result array with both types. The mysql_fetch_ assoc is an alternative to supplying the MYSQL_ASSOC argument. If you rewrote the code shown previously to use mysql_fetch_array with an associative indexed array, it would look like this: // Fetch and display the results while ($result_row = mysql_fetch_array($result, MYSQL_ASSOC)){ echo 'Title: '.$result_row['title'] . '<br />'; echo 'Author: '.$result_row['author'] . '<br /> '; echo 'Pages: '.$result_row['pages'] . '<br /><br />'; } Closing the ConnectionAs a rule of thumb, you always want to close a connection to a database when you’redone using it. Closing a database with mysql_close will tell PHP and MySQL that you no longer will be using the connection, and will free any resources and memory allocated to it: mysql_close($connection) Using PEARPEAR is a framework and distribution system for reusable PHP components, creating a collection of add-on functionalities for PHP development. There are many modules available to handle everything fromsession management to shopping cart functionality. Categories of modules that are currently available are listed in Table 9-1. Table 9-1. PEAR modules categoriesAuthentication Authentication HTML HTML  Processing Benchmarking Benchmarking HTTP HTTP  Science Caching Caching Images Images  Semantic Web Configuration Configuration Internationalization Internationalization  Streams Console Console Logging Logging  Structures Database Database Mail Mail  System Date/Time Date/Time Math Math  Test Encryption Encryption Networking Networking  Tools and utilities Event Event Numbers Numbers  Validate File formats Payment Web services File system PEAR XML GTK components PHP Our list is not complete. Visit  to find out all of the modules thatare available for download. InstallingPEAR uses a Package Manager that oversees which PEAR features you install. Whether you need to install the Package Manager depends on which version of PHP you installed. If you’re  has been split out into a running PHP 4.3.0 or newer, it’s already installed. If you’rerunning PHP 5.0, PEARseparate package. The DB package that you’re interested in is optional but installed by default with the Package Manager. So if you have the Package Manager, you’re all set.UnixYou can install the Package Manager on a Unix systemby executing the following from the shell (command-line) prompt: lynx -source / | php This takes the output of the  site (which is actually the source PHP code) to install PEAR and passes it along to the php command for execution. WindowsC:\php\go-pear.bat. In case you didn’t install all The PHP 5 installation includes the PEAR installation script as C:/php from the command prompt, and execute the files in Chapter 2, go ahead and extract all the PHP files to the .bat file. If you installed PHP fromthe MSI installer, you may need to execute go-pear.bat file: the following instead of the php go-pear.phar If the PEAR directory does not exists at all you’ll need to re-run the PHP MSI installer, select the Change option, and set Extensions and go-pear.phar. Extras to “Will be installed on local drive” before running Figure 9-5 shows the initial screen after executing the PEAR installer. Figure 9-5. The go-pear.bat install scriptou can accept the defaults for all of them. The base path should be You’ll be asked a set of questions about paths. YC:\php. The php.exe file must be in your path. Verify by typing php.exe froma command prompt. If it is not found, you’ll need to add it to your PATHvariable. To access your systempath, navigate to Start ➝Control Panel ➝System ➝Environment, and add an C:\php. entry to the end of the path with C:\php\PEAR_ENV.reg. You need to doubleclick to set up the PEAR paths The PEAR installer creates a file called in the registry. This file is contingent on which PEAR version you installed. When the dialog appears to verify your information, you will add this to the registry and click OK. php.ini file after running this .bat file to add the PEAR directory to the include path. Line You may have to edit the php.ini now looks like this: 447 of p hp.iniinclude_path = ".;c:\php\includes;c:\php\PEAR" Apache must be restarted before the DB package can be used. Hosted ISPMost ISPs have PEAR DB installed. Ask your ISP to install it if they haven’t already. You can tell whether PEAR DB has been installed by trying the PHP code in Example 9-8 to see whether the require_once ('DB.php'); line causes an error when the script is executed. Adding Additional PackagesOnce that’s complete, y ou can access the PEAR Package Manager by entering pearat the command prompt. packagename. Adding new modules is as easy as executing pear You won’t need to do anything because the DB package was installed along with the install by default.you’re running Windows XP Home, you’ll need to take these steps to install the PEAR DB: However, if y ou’re running Windows XP Home, you’ll need to take these steps to install the PEAR DB:C:\>cd c:\php C:\>pear install DB C:\>pear list To find out which versions of PEAR packages are installed, execute pear list. That returns a listing such as the one shown in Figure 9-6. Figure 9-6. A listing of installed PEAR packages and versionsOnce you’ve got PEAR installed, you’re ready to try it out.Rewriting the Books Example with PEAR When using the PEAR DB package, you follow the same steps. However, the function syntax is slightly different. -7. We’ll go line by line and explain the differences as they appear in Example 9Example 9-7. Displaying the books table with PEAR DB1 <?php 2 3 include('db_login.php'); 4 require_once('DB.php'); 5 6 $connection = DB::connect("mysql://$db_username:$db_password@$db_host/$db_database"); 7 8 if (DB::isError($connection)){ 9 die("Could not connect to the database: <br />".DB::errorMessage($connection)); 10 } 11 12 $query = "SELECT * FROM books NATURAL JOIN authors"; 13 $result = $connection->query($query); 14 15 if (DB::isError($result)){ 16 die("Could not query the database:<br />$query ".DB::errorMessage($result)); 17 } 18 19 echo('<table border="1">'); 20 echo '<tr><th>Title</th><th>Author</th><th>Pages</th></tr>'; 21 22 while ($result_row = $result->fetchRow( )) { 23 echo "<tr><td>"; 24 echo $result_row[1] . '</td><td>'; 25 echo $result_row[4] . '</td><td>'; 26 echo $result_row[2] . '</td></tr>'; 27 } 28 29 echo("</table>"); 30 $connection->disconnect( ); 31 32 ?> Example 9-7 displays the screen shown in Figure 9-7. Figure 9-7. Switching to the PEAR DB functions didn’t change the outputNotice that Figure 9-7 is identical to the output in Figure 9-4. Line 3 includes your database login information and remains unchanged: include('db_login.php'); Line 4 has a new require statement: require_once( "DB.php" ); This requires the file DB.php, which provides the PEAR DB functions. The require_once function stops your code DB.php fileis not found. It also will not include the file if it has been fromexecuting and returns an error if the incorporated already. And,this would cause an error. DB.php is found in the /pear subdirectory of the PHP distribution.The PEAR install should have added The file D B.phpphp.ini file. If this file is not found, verify thatPEAR DB is installed and that directory to the include_path in the that the paths are set up correctly. Creating a connect instanceThe DB.php file defines a class of type DB. Refer to Chapter 5 for more information on working with classes and objects. We’ll principally be calling the methods in the class. The DB class has a connect method, which we’ll use instead of our old connect function, mysql_connect. The double colons (::) indicate that we’re calling that function from the class in line 4: $connection = DB::connect("mysql://$db_username:$db_password@$db_host/$db_database"); When you call the connect function, it creates a new database connection that is stored in the variable $connection. The connect function attempts to connect to the database based on the connect string you passed to it. Connect stringThe connect string uses this new format to represent the login information that you already supplied in separate fields: dbtype://username:password@host/databaseThis format may look fam iliar to you, as it’s very similar to the connect string for a Windows file share. The first part of the string is what really sets the PEAR functions apart fromthe plain PHP. The phptype field specifies the type of database to connect. Supported databases include ibase, msql, mssql, mysql, oci8, odbc, pgsql, and sybase. All that’s required for your PHP page to work with a different type of database is changing the phptype!The username, password, host, and database should be familiar from the basic PHP connect. Only the type of connection is required. However, you’ll usually want to specify all fields.After the values from db_login.php are included, the connect string looks like the following: "mysql://test:test@localhost/test" If the connect method on line 6 was successful, a DB object is created. It contains the methods to access the database as well as all of the information about the state of that database connection. Queryingt like PHP’s query function in that it One of the methods it contains is called query. The query method works justakes a SQL statement. The difference is that the arrow syntax (->) is used to call it fromthe object. It also returns the results as another object instead of a result set: $query = "SELECT * FROM books" $result = $connection->query($query); Based on the SQL query, this code calls the query function fromthe connection object and returns a result object named $result. FetchingLine 22 uses the result object to call the fetchRow method. It returns the rows one at a time, similar to mysql_fetch_row: while ($result_row = $result->fetchRow( )) { echo 'Title: '.$result_row[1] . '<br />'; echo 'Author: '.$result_row[4] . '<br /> '; echo 'Pages: '.$result_row[2] . '<br /><br />'; } from fetchRow until it returns FALSE. The code in the loop hasn’t Use another while loop to go through each row changed from the non-PEAR example. ClosingIn line 30, you’re finished with the database connection, so close it using the object method disconnect: $connection->disconnect( ); PEAR error reportingThe function DB::isError will check to see whether the result that’s been returned to you is an error. If it is an error, you can use DB::errorMessage to return a text description of the error that was generated. You need to pass DB::errorMessage, the return value from your function, as an argument. Here you rewrite the PEAR code to use error checking: <?php if ( DB::isError( $demoResult = $db->query( $sql))) { echo DB::errorMessage($demoResult); } else { while ($demoRow = $demoResult->fetchRow( )) { echo $demoRow[2] . '<br />'; } } > There’s also a new version of the PEAR database interface called PEAR::MDB2. To rewrite our example using the MDB2 version, see Example 9-8. <?php include('db_login.php'); require_once('MDB2.php'); //Translate our database login information into an array. $dsn = array( 'phptype' => 'mysql', 'username' => $username, 'password' => $password, 'hostspec' => $host, 'database' => $database ); //Create the connection as an MDB2 instance. $mdb2 = MDB2::factory($dsn); if (PEAR::isError($mdb2)) { die($mdb2->getMessage( )); } //Set the fetchmode to field associative. $mdb2->setFetchMode(MDB2_FETCHMODE_ASSOC); $query = "SELECT * FROM books NATURAL JOIN authors"; $result =$mdb2->query($query); if (PEAR::isError($result)){ die("Could not query the database:<br />$query ".$result->getMessage( )); } //Display the results. echo('<table border="1">'); echo '<tr><th>Title</th><th>Author</th><th>Pages</th></tr>'; //Loop through the result set. while ($row = $result->fetchRow( )) { echo "<tr><td>"; echo htmlentities($row['title']) . '</td><td>'; echo htmlentities($row['author ']) . '</td><td>'; echo htmlentities($row['pages']) . '</td></tr>'; } echo("</table>"); //Close the connection. $result->free( ); > The same results display, but there are more functions available in this version of the PEAR database abstraction layer. Now that you have a good handle on connecting to the database and the various functions of PEAR。

php开发中最常用的英语单词

php开发中最常用的英语单词

php开发中最常用的英语单词php 英语单词,php 常用英语单词,帮助您快速学习php 编程语言!掌握了php 里面所涉及到的所有英语单词,能更好的帮助您快速理解php 编程语言,让您学习php 编程语言的速度快人十倍。

abstract ['æbstrækt] 抽象的access ['ækses ]存取、访问account [ə'kaʊnt]账户action ['ækʃ(ə)n]动作activate ['æktɪveɪt]激活active ['æktɪv]活动的adapter [ə'dæptə]适配器address [ə'dres]地址aggregation [,æɡrɪ'ɡeɪʃən]聚合、聚集algorithm ['ælgərɪð(ə)m]算法alias ['eɪlɪəs]别名align [ə'laɪn]排列、对齐allocate ['æləkeɪt]分配、配置allocator ['æləukeitə]分配器、配置器annotation [ænə'teɪʃ(ə)n]注解、评注appearance [ə'pɪər(ə)ns]外观append [ə'pend]附加application [ˌæplɪ'keɪʃ(ə)n]应用、应用程序architecture ['ɑːkɪtektʃə]架构、体系结构argument ['ɑːgjʊm(ə)nt]引数(传给函式的值)array 数组assembly [ə'semblɪ]装配件、配件assert(ion) [ə'sɜːt]断言assign [ə'saɪn]赋值assignment [ə'saɪnm(ə)nt]赋值、分配associated [ə'soʃɪetɪd]相关的、相关联的asynchronous 异步的atomic 原子的attribute 特性、属性audio 音频authorization 授权background 背景、后台(进程)backup 备份bandwidth 带宽batch 批处理binary 二进制binding 绑定bit 位bitmap 位图bitwise 按位...block 块、区块、语句块bookkeeping 簿记boolean 布林值(真假值,true 或false)border 边框boxing 装箱、装箱转换brace 大括号、花括号bracket 中括号、方括号breakpoint 断点bug 臭虫build 编连(专指编译和连接bus 总线business 业务、商务(看场合) buttons 按钮byte 位元组(由8 bits 组成)cache 高速缓存Calculations calendar 日历Calendrical call 调用callback 回调casting 转型、造型转换catalog 目录chain 链character 字符checkpoint 检查点class 类classification 分类clause 子句cleanup 清理、清除client 客户、客户端clipboard 剪贴板Clique 最大团clone 克隆collection 集合comment 注释copy 拷贝getter (相对于setter) 取值函数global object 全局对象global 全局的grant 授权granularity 粒度group 组、群handle 句柄handler 处理器hard disk 硬盘hardware 硬件heap 堆hierarchy 层次结构、继承体系hook 钩子hyperlink 超链接icon 图标identifier 标识符image 图象implement 实现implementation 实现、实现品implicit 隐式import 导入index 索引information 信息infrastructure 基础设施inheritance 继承、继承机制initialization 初始化initialize 初始化inline 内联instance 实例instantiated 具现化、实体化instantiation 具现体、具现化实体integrate 集成、整合integrity 完整性、一致性interacts 交互interface 接口interoperability 互操作性、互操作能力interpreter 解释器introspection 自省invariants 不变性invoke 调用item 项、条款、项目iterate 迭代iteration 迭代iterative 反复的、迭代的iterator 迭代器Kd-Trees 线段树key 键laser 激光level 阶、层例library 库lifetime 生命期、寿命link 连接、链接linkage 连接、链接linker 连接器、链接器list 列表、表、链表livelock 活锁load 装载、加载loader 装载器、载入器local 局部的lock 锁log 日志login 登录loop 循环lvalue 左值macro 宏maintain 维护manifest 清单manipulator 操纵器marshal 列集Matching 匹配member 成员memory 内存menu 菜单message 消息metadata 元数据metaprogramming 元编程method 方法micro 微middleware 中间件modeling 建模modem 调制解调器modifier 修饰字、修饰符module 模块mouse 鼠标multiuser 多用户mutable 可变的mutex 互斥元、互斥体namespace 名字空间、命名空间native 原生的、本地的network 网络object 对象operand 操作数operation 操作operator 操作符、运算符operator 调用操作符optimizer 优化器option 选项overflow 上限溢位overhead 额外开销overload 重载override 覆写、重载、重新定义package 包packaging 打包palette 调色板parallel 并行parameter parameter 参数、形式参数、形参parameterize 参数化parent class 父类parentheses 圆括弧、圆括号parse 解析parser 解析器part 零件、部件pattern 模式performance 性能persistence 持久性pixel 像素placeholder 占位符platform 平台pointer 指针poll 轮询polymorphism 多态pooling 池化pop up 弹出式port 端口postfix 后缀precedence 优先序prefix 前缀preprocessor 预处理器print 打印printer 打印机procedural 过程式的、过程化的procedure 过程process 进程profile 评测profiler 效能(性能)评测器program 程序programmer 程序员programming 编程、程序设计project 项目、工程property 属性protocol 协议qualifiedqualifier 修饰符quality 质量queue 队列radian 弧度raise 引发range 范围、区间rank 等级raw 未经处理的readOnly 只读record 记录recordset 记录集recursion ——递归recursive 递归refactoring 重构refer 引用、参考reference 引用、参考reflection 反射register 寄存器remote 远程represent 表述,表现resolution 解析过程resolve 解析、决议result set 结果集return 返回revoke 撤销robust 健壮robustness 健壮性routine 例程row 行rowset 行集runtime 执行期、运行期、执行时、运行时rvalue 右值Satisfiability 可满足性save 保存savepoint 保存点scalable 可伸缩的、可扩展的schedule 调度scheduler 调度程序schema 模式、纲目结构scope 作用域、生存空间screen 屏幕search 查找Searching 查找semantics 语义semaphore 信号量serial 串行serialization 序列化server 服务器、服务端session 会话setter 设值函数sibling 同级signature 签名slider 滑块slot 槽snapshot 截屏图snapshot 快照software 软件Sorting 排序specialization 特化specification 规范、规格splitter 切分窗口stack 栈、堆栈stateless 无状态的statement 语句、声明stream 流string 字符串stub 存根subobject 子对象subquery 子查询subroutine 子例程subset 子集subtype 子类型support 支持suspend 挂起symbol 记号syntax 语法table 表target 标的,目标template 模板text 文本thread 线程through 通过throw 抛出、引发token 符号、标记、令牌trace 跟踪transaction 事务traverse 遍历Triangulation 三角剖分trigger 触发器tuple type 类型unboxing 拆箱、拆箱转换underflow 下限溢位unmarshal 散集unqualified 未经限定的、未经修饰的user 用户variable 变量vector 向量vendor 厂商viable 可行的video 视频view 视图view 视图vowel 元音字母window 窗口wizard 向导word 单词wrapper 包装、包装器commit [kə'mit] 提交communication [kəmju:ni'keiʃən] 通讯compatible [kəm-'pæ-tə-bl] 兼容compiler [kəm'pailə] 编译器component [kəm-'pəu-nənt] 组件composition [kɔmpə'ziʃən] 复合、组合concept ['kɔnsept] 概念concrete ['kɔnkri:t] 具体的concurrency [kən-'kʌrən-si] 并发、并发机制configuration [kənfigju'reiʃən] 配置、组态connection [kə'nekʃən] 连接console [kən'səul] 控制台constant ['kɔnstənt] 常量constraint [kən'streint] 约束construct [kən'streint] 构件、成分、概念、构造constructor [kən'strʌktə] 构造函数、构造器container [kən'teinə] 容器containment [kən'teinmənt] 包容context ['kɔntekst] 环境、上下文control [kən'trəul] 控件Convex Hull ['kɔnveks]&[hʌl] 凸包cookie ['kuki] (饼干、小甜点)cover ['kʌvə] 覆盖、涵盖create/creation [kri(:)'eit]/[kri'eiʃən]创建、生成Cryptography [krip'tɔgrəfi] 密码cube [kju:b] 多维数据集cursor ['kə:sə] 光标、游标custom ['kʌstəm] 定制、自定义data ['deitə] 数据database ['deitəbeis] 数据库dataset ['deitəset] 数据集Dictionaries ['dikʃənəri]字典efficiency [i'fiʃənsi] 效率efficient [i'fiʃənt] 高效encapsulation [inkæpju'leiʃən] 封装engine ['endʒin] 引擎entity ['entiti] 实体enumeration [inju:mə'reiʃən] 枚举enumerators [i'nju:məreitə] 枚举成员、枚举器equal ['i:kwəl] 相等equality [i(:)'kwɔliti] 相等性error log ['erə] [lɔg] 错误日志evaluate [i'væljueit] 评估event [i'vent] 事件evidence ['evidəns] 证据exception [ik'sepʃən] 异常exit ['eksit] 退出explicit [iks'plisit] 显式export [iks'pəurt] 导出expression [iks'preʃən] 表达式facility [fə'siliti] 设施、设备feature ['fi:tʃə] 特性、特征fetch [fetʃ] 提取field length [fi:ld] [leŋθ] 字段长度field [fi:ld] 字段filter ['filtə] 筛选finalization ['fæ.nə.l.ei.ʃ]终结finalizer ['fainlaiz] 终结器fire wall ['faiə] [wɔ:l] 防火墙firmware [fə:mwɛə]固件flag [flæg] 标记flush [flʌʃ]刷新form [fɔ:m] 窗体fragmentation [frægmən'teiʃən] 碎片framework ['freimwə:k] 框架function ['fʌŋkʃən] 函数functionality [fʌŋkəʃə'næliti] 功能functor ['fʌŋktə] 仿函数generate ['dʒenəreit] 生成generic [dʒi'nerik] 泛化的、一般化的、通用的genericity 泛型getter (相对于setter['setə]) ['getə] 取值函数---精心整理,希望对您有所帮助。

PHP中英文介绍

PHP中英文介绍

PHPPHP的(递归的缩写,代表“PHP:Hypertext Preprocessor”的)是一种被广泛使用的开放源代码多用途脚本语言,特别适合于Web开发,可嵌入到HTML中。

简单的答案,但到底是什么意思呢?一个例子:例1.1。

一个简单的例子<html><head><title>举例</title></head><body><?phpecho "Hi, 这是一个PHP程序!";></body></html>请注意这是不同于如Perl或C等语言编写的脚本,而不是编写大量的指令来输出HTML,你写了一个内嵌了代码的HTML脚本做一些事情(在这种情况下,输出一些文本)。

PHP代码包含在特殊的开始和结束标记,让您可以随时进出“PHP模式”。

什么区别时,PHP等客户端JavaScript的代码是在服务器上执行。

如果你有一个类似的脚本在您的服务器上面,客户端将收到的运行的脚本的结果,但没有确定什么底层代码可能是这样。

您甚至可以配置Web服务器来处理所有的与PHP的HTML文件,然后确实没有办法,用户就可以知道你有你的袖口。

使用PHP的最好的事情是,它是对于初学者来说极其简单,但提供了一个专业的程序员许多先进的功能。

不要害怕看到PHP长长的功能清单。

你可以在跳跃,在很短的时间,并开始编写一些简单的脚本。

PHP是一种反射编程语言最初是为制作动态网页设计。

PHP是主要用于服务器端脚本,但可以从一个命令行界面或独立的图形应用。

文字上的用户界面也可以创建使用ncurses 的。

主要的执行是由该PHP集团下的PHP许可证发布。

它被认为是由自由软件基金会自由软件。

这个实现服务定义一个PHP的事实上的标准,因为没有正式的规范。

历史PHP被写为一个CGI二进制执行文件的C编程语言设立的丹麦/格陵兰程序员拉斯穆斯Lerdorf在1994年,以取代一个Perl脚本,他一直使用维护自己的网页一小部分。

php和mysql web开发外文翻译 (2)

php和mysql web开发外文翻译 (2)

外文翻译-原文部分Laura Thomson php and mysql web develop PHP is a scripting language originally designed for producing dynamic web pages It has evolved to include a command line interface capability and can be used in standalone graphical applications.While PHP was originally created by Rasmus Lerdorf in 1995, the main implementation of PHP is now produced by The PHP Group and serves as the de facto standiird for PHP as there is no formal specification. PHP is free software released under the PHP License, however it is incompatible with the GNU General Public License (GPL), due to restrictions on the usage of the term PHP.PHP is a widely-used general-purpose scripting language that is especially suited for web development and can be embedded into HTML. It generally runs on a web server, taking PHP code as its input and creating web pages as output. It can be million websites and 1 million web servers.PHP originally stood for Personal Home Page, It began in 1994 as a set of Common Gateway Interface binaries written in the C programming language by the Danish/Greenlandic programmer Rasmus Lerdorf. Lerdorf initially created these Personal Home Page Tools to replace a small set of Perl scripts he had been using to maintain his personal homepage. The tools were used to perform tasks such as displaying his rdsum^ and recording how much traffic his page was receiving. He combined these binaries with his Fonn Interpreter to create PHP/FI, which had more functionality. PHP/FI included a larger implementation for the C programming language and could communicate with databases, enabling the building of simple, dynamic web applications. lerdorf released PHP publicly on June 8,1995 to accelerate bug location and improve the code.This release was named PHP version 2 and already had the basic functionality that PHP has today. This included Perl-like variables, form handling, and the ability to embed HTML. The syntax was similar to Perl but was more limited, simpler, and less consistent.Zeev Suraski and Andi Gutmans,two Israeli developers at the Technion IIT,rewrote the parser in 1997 and formed the base of PHP 3, changing the language's name to the recursive initialism PHP: Hypertext Preprocessor. The development team officially released PHP/FI 2 in November 1997 after months of beta testing. Afterwards, public testing of PHP 3 began, and the official launch came in June 1998. wSuraski and Gutmans then started a new rewrite of PHP's core, producing the Zend Engine in 1999. They also founded Zend Technologies in Ramat Gan, Israel.On May 22, 2000, PHP 4, powered by the Zend Engine 1 •0, was released. On July 13, 2004, PHP 5 was released, powered by the new Zend Engine II. PHP 5 included new features such as improved support for object-oriented programming, the PHP DataObjects extension (which defines a lightweight and consistent interface for accessing databases), and numerous performance enhancements. The most recent update released by The PHP Group is for the older PHP version 4 code branch. As of August, 2008 this branch is up to version 4.4.9. PHP 4 is no longer under development nor will any security updates be released.In 2008, PHP 5 became the only stable version under development. Late static binding has been missing from PHP and will be added in version 5.3. PHP 6 is under development alongside PHP 5. Major changes include the removal of register_globals,magic quotes, and safe mode. The reason for the removals was because register_globals had given way to security holes,and magic quotes had an unpredictable nature, and was best avoided. Instead, to escape characters, magic quotes may be substituted with the addslashes() function, or more appropriately an escape mechanism specific to the database vendor itself like mysql_rcal_escape_string() for MySQL.PHP does not have complete native support for Unicode or multibyte strings; Unicode support will be included in PHP 6. Many high profile open source projects ceased to support PHP 4 in new code as of February 5, 2008, due to the Go PHP 5 initiative, provided by a consortium of PHP developers promoting the transition from PHP 4 to PHP 1397 It runs in both 32-bit and 64-bit environments, but on Windows the only official distribution is 32-bit, requiring Windows 32-bit compatibility mode to be enabled while using IIS in a 64-bit Windows environment. There is a third-partydistribution available for 64-bit Windows.PHP is a general-purpose scripting language that is especially suited for web development. PHP generally runs on a web server, taking PHP code as its input and creating web pages as output. It can also be used for command-line scripting and client-side GUI applications. PHP can be deployed on most web servers, many operating systems and platforms, and can be used with many relational database management systems. It is available free of charge, and the PHP Group provides the complete source code for users to build, customize and extend for their own use.PHP primarily acts as a filter, taking input from a file or stream containing text and/or PHP instructions and outputs another stream of data; most commonly the output will be HTML. It can automatically detect the language of the user. From PHP 4, the PHP parser compiles input to produce bylecode for processing by the Zend Engine, giving improved performance over its interpreter predecessor.Originally designed to create dynamic web pages,PHP’s principal focus is server-side scripting, and it is similar to other server-side scripting languages that provide dynamic content from a web server to a client, such as Microsoft’s Active Server Pages, Sun Microsystems1 JavaServer Pages, and mod_perl. PHP has also attracted the development of many frameworks that provide building blocks and a design structure to promote rapid application development (RAD). Some of these include CakePHP, Symfony, Codeigniter, and Zend Framework, offering features similar to other web application frameworks-The LAMP architecture has become popular in the web industry as a way of deploying vveb applications. PHP is commonly used as the P in this bundle alongside Linux, Apache and MySQL, although the P may also refer to Python or Perl.As of April 2007, over 20 million Internet domains were hosted on servers with PHP installed, and PHP was recorded as the most popular Apache module. Significant websites arc written in PHP including the user-facing portion of Faccbook, Wikipedia , PHP can be used to create stand-alone, compiled applications and libraries, it can be used for shell scripting, and the PHP binaries can be called from the command line.As with many scripting languages,PHP scripts are normally kept as human-readable source code, even on production web servers. In this case, PHPscripts will he compiled at runtime by the PHP engine, which increases their execution time. PHP scripts are able to be compiled before runtime using PHP compilers as with other programming languages such as C (the language PHP and its extensions are written in).Code optimizers aim to reduce the computational complexity of the compiled code by reducing its size and making other changes that can reduce the execution time with the overall goal of improving performance. The nature of the PHP compiler is such that there are often opportunities for code optimization, and an example of a code optimizer is the Zend Optimizer PHP extension.Another approach for reducing overhead for high load PHP servers is using PHP accelerators. These can offer significant performance gains by caching the compiled form of a PHP script in shared memory to avoid the overhead of parsing and compiling the code every time the script runs.The National Vulnerability Database stores all vulnerabilities found in computer software. The overall proportion of PHP-related vulnerabilities on the database amounted to: 12% in 2003, 20% in 2004, 28% in 2005, 43% in 2006, 36% in 2007, and 35% in 2008. Most of these PHP-related vulnerabilities can be exploited remotely: they allow hackers to steal or destroy data from data sources linked to the Webserver (such as an SQL database),send spam or contribute to DOS attacks using malware,which itself can be installed on the vulnerable servers.These vulnerabilities arc caused mostly by not following best practice programming rules: technical security flaws of the language itself or of its core libraries are not frequent. Recognizing that programmers cannot be trusted, some languages include taint checking to detect automatically the lack of input validation which induces many issues. Such a feature is being developed for PHP. Allhough it may be included in mainstream PHP in a future release, its inclusion has been rejected several times in the past.Hosting PHP applications on a server requires a careful and constant attention to deal with these security risks. There are advanced protection patches such as vSuhosin and Hardening-Patch, especially designed for web hosting environments. Installing PHP as a CGI binary rather than as an Apache module is the preferred method foradded security.With respect to securing the code itself, PHP code can be obfuscated to make it difficult to read while remaining functional.Syntax-highlighted PHP code embedded within HTMLPHP only parses code within its delimiters. Anything outside its delimiters is sent directly to the output and is not parsed by PHP. The most common delimiters are <?php and ?>, which are open and close delimiters respectively.〈script language="php"> and </script> delimiters are also available. Short tags can be used to start PHP code, <? or <?= (which is used to echo back a string or variable) and the tag to end PHP code, ?>. These tags arc commonly used,but like ASP-style tags (<% or <%= and %>),they are less portable as they can be disabled in the PHP configuration. For this reason, the use of short tags and ASP-style tags is discouraged. The puipose of these delimiters is to separate PHP code from non-PHP code,including HTML.Variables arc prefixed with a dollar symbol and a type docs not need to be specified in advance. Unlike function and class names, variable names are case sensitive. Both double-quoted (“”) and heredoc strings allow the ability to embed a variable's value into the string. PHP treats newlines as whitespace in the manner of a free-form language (except when inside string quotes), and statements are terminated by a semicolon. PHP has three types of comment syntax: /* */ serves as block comments, and // as well as # are used for inline comments. The echo statement is one of several facilities PHP provides to output text (e.g. to a web browser).In terms of keywords and language syntax, PHP is similar to most high level languages that follow the C style syntax. If conditions, for and while loops, and function returns arc similar in syntax to languages such as C, C++, Java and Perl.PHP stores whole numbers in a platform-dependent range. This range is typically that of 32-bit signed integers. Unsigned integers are converted values in certain situations; this behavior is different from other programming languages.Integer variables can be assigned using decimal (positive and negative), octal, and hexadecimal notations- Floating point numbers arc also stored in a platform-specific range. They can be specified using floating point notation, or two forms of scientific notation. PHP has a native Boolean type that is similar to the native Boolean types inJava and C++. Using the Boolean type conversion rules,non-zero values are interpreted as true and zero as false, as in Perl and C++.The null dala type represents a variable that has no value. The only value in the null data type is NULL. Variables of the nresourceM type represent references to resources from external sources. These are typically created by functions from a particular extension, and can only be processed by functions from the same extension; examples include file, image, and database resources. Arrays can conlain elements of any type thal PHP can handle, including resources, objects, and even other arrays. Order is preserved in lists of values and in hashes with both keys and values, and the two can be intermingled. PHP also supports strings, which can be used with single quotes, double quotes, or heredoc syntax.The Standard PHP Library (SPL) attempts to solve standard problems and implemenls efficient data access interfaces and classes.PHP has hundreds of base functions and thousands more via extensions. These functions are well documented on the PHP site, but unfortunately, the built-in library has a wide variety of naming conventions and inconsistencies. PHP currently has no functions for thread programming.Functions are not first-class functions and can only be referenced by their name—directly or dynamically by a variable containing the name of the function.User-defined functions can be created at any time without being prototyped. Functions can be defined inside code blocks, permitting a run-time decision as to whether or not a function should be defined. Function calls must use parentheses, with the exception of zero argument class constructor functions called with the PHP new operator, where parentheses are optional. PHP supports quasi-anonymous functions through the create_function() function, although they are not true anonymous functions because anonymous functions are nameless, but functions can only be referenced by name, or indirectly through a variable $runction_name(); in PHP.PHP gained support for first-class functions and closures. True anonymous functions are supported using the following syntax:function getAdder($x){return function ($y) use ($x) {return $x + $y;};}Sadder = getAdder(8);echo $adder(2); // prints ”10"Here, gctAddcr() function creates a closure using parameter $x (keyword “use” forces getting variable from context), which, etc. For more details see Lambda functions and closures RFC.Basic object-oriented programming functionality was added in PHP 3 and improved in PHP 4.|3| Object handling was completely rewritten for PHP 5, expanding the feature set and enhancing performance. In previous versions of PHP, objects were handled like primitive types. The drawback of this method was that the whole object was copied when a variable was assigned or passed as a parameter to a method. In the new approach, objects are referenced by handle, and not by value. PHP 5 introduced private and protecled member variables and methods, along with abstract classes and final classes as well as abstract methods and final methods. It also introduced a standard way of declaring constructors and destructors, similar to that of other object-oriented languages such as C++, and a standard exception handling model. Furthermore, PHP 5 added interfaces and allowed for multiple interfaces to be implemented. There are special interfaces that allow objects to interact with the runtime system. Objects implementing ArrayAcccss can be used with array syntax and objects implementing Iterator or IteratorAggregate can be used with the foreach language construct. There is no virtual table feature in the engine, so static variables are bound with a name instead of a reference at compile time.If the developer creates a copy of an object using the reserved word clone, the Zend engine will check if a _clonc() method has been defined or not. If not, it will call a default _clone() which will copy the object's properties. If a _clone() method is defined, then it will be responsible for setting the necessary properties in the created object. For convenience, the engine will supply a function that imports the properties of the source object, so that the programmer can start with a by-value replica of thesource object and only override properties that need to be changed.PHP includes free and open source libraries with the core build. PHP is a fundamentally Internet-aware system with modules built in for accessing.FTP servers, many database servers, embedded SQL libraries such as embedded PostgreSQL, MySQL and SQLite, LDAP servers, and others. Many functions familiar to C programmers such as those in the stdio family are available in the standard PHP build. PHP has traditionally used features such as ’’magic_quotes_gpc” and “magic_quotcs_runti me” whic h attempt to escape apostrophes (‘) and quotes (‘’) in strings in the assumption that they will be used in databases, to prevent SQL injection attacks. This leads to confusion over which data is escaped and which is not, and to problems when data is not in fact used as input to a database and when the escaping used is not completely correct.|68| To make code portable between servers which do and do not use magic quotes, developers can preface their code with a script to reverse the effect of magic quotes when it is applied.PHP allows developers to write extensions in C to add functionality to the PHP language. These can then be compiled into PHP or loaded dynamically at runtime. Extensions have been written to add support for the Windows API, process management on Unix-likc operating systems, multibytc strings (Unicode), cURL, and several popular compression formats. Some more unusual features include integration with Internet Relay Chat, dynamic generation of images and Adobe Flash content, and even speech synthesis. The PHP Extension Community Library (PECL) project is a repository for extensions to the PHP language.Zend provides a certification exam for programmers to become certified PHP developers.外文翻译-译文部分php和mysql web开发PHP是最初设计用于生成动态网页的脚本语言,它已经演变成包括命令行界面功能,可以在独立的图形应用程序中使用。

PHP是什么

PHP是什么

PHP是什么PHP 是什么?简述:PHP,是英文超文本预处理语言 Hypertext Preprocessor 的缩写。

PHP 是一种 HTML 内嵌式的语言,是一种在服务器端执行的嵌入 HTML 文档的脚本语言,语言的风格有类似于 C语言,被广泛地运用。

中文名:PHP外文名:HypertextPreprocessor编程范型:面向对象、命令式编程RasmusLerdorf设计者:维护:ThePHPGroup最新版本:5.5.0(2013‐06‐20)操作系统:window/linux/Mac 跨平台语言解析PHP 独特的语法混合了 C、Java、 Perl 以及 PHP 自创的语法。

它可以比 CGI 或者 Perl 更快速地执行动态网页。

用 PHP 做出的动态页面与其他的编程语言相比, PHP 是将程序嵌入到 HTML 文档中去执行,执行效率比完全生成 HTML 标记的CGI 要高许多; PHP 还可以执行编译后代码,编译可以达到加密和优化代码运行,使代码运行更快。

1/ 3发展历程:PHP 原始为PersonalHomePage 的缩写,已经正式更名为quot;PHP:HypertextPreprocessorquot;的缩写。

注意不是HypertextPreprocessor 的缩写,这种将名称放到定义中的写法被称作递归缩写。

PHP 于1994 年由RasmusLerdorf 创建,刚刚开始是RasmusLerdorf 为了要维护个人网页而制作的一个简单的用 Perl 语言编写的程序。

这些工具程序用来显示 RasmusLerdorf 的个人履历,以及统计网页流量。

后来又用 C 语言重新编写,包括可以访问数据库。

他将这些程序和一些表单直译器整合起来,称为 PHP/FI。

PHP/FI 可以和数据库连接,产生简单的动态网页程序。

在 1995 年以 PersonalHomePageTools(PHPTools) 开始对外发表第一个版本, Lerdorf 写了一些介绍此程序的文档。

php the right way_php之道

php the right way_php之道

PHP之道翻译:wulijun关注我的微博目前网络上充斥着大量的陈旧信息,让PHP新手误入歧途,传播着错误的实践和糟糕的代码,这必须得到纠正。

PHP之道网站的目标就是搜集PHP最佳实践、编码规范和网络上的权威学习指南,给PHP学习者提供一个易于阅读,快速查找的入口。

翻译PHP之道已经翻译成多种语言:∙English∙中文版∙日文版∙Polish (Coming Soon)∙Portuguese (Coming Soon)∙Russian (Coming Soon)∙西班牙语Ukrainian (Coming Soon)免责声明PHP没有规范化的使用方式,本网站只是展示业界的最佳实践、可用的选项和有用的信息,目的是帮助PHP新手,并对以往的经验进行反思。

本文档会随着相关技术的发展,持续更新其中的信息和示例。

如何参与网站建设参与我们,让这个网站成为PHP开发者的最好学习资源!去GitHub参与建设网站推广网站PHP之道有多个banner宣传图片可以放在你的站点上显示,让更多开发者知道这个网站,找到权威的学习资料!查看banner图片Getting Started使用当前稳定版本(5.4)如果你刚开始学习PHP,请使用最新稳定版本PHP 5.4. PHP近年来有了巨大的改进,增加了许多强大的新特性。

不要让低版本的PHP如5.2的缺陷误导你,这些新特性是对旧版本的重要改进。

如果你想查找一个函数及其用法,可以去官方PHP手册查找。

内置的Web服务器有了它,你可以不用安装和配置功能齐全的Web服务器,就可以开始学习PHP(要求PHP 5.4版本)。

要启动内置Web服务器,需要从你的命令行终端进入项目的Web根目录,执行下面的命令:> php -S localhost:8000了解更多内置的命令行Web服务器Mac 安装OSX系统会预装PHP,只是版本比最新稳定版低一点。

目前Lion下是PHP 5.3.6,Mountain Lion下是5.3.10.要更新OSX中的PHP,你可以通过那些Mac包管理器来安装,推荐使用php-osx by Liip。

php 单词集合 php开发中最常用的英语单词

php 单词集合 php开发中最常用的英语单词

php开发中最常用的英语单词php 1000多个英语单词,php常用英语单词,帮助您快速学习php编程语言!掌握了php里面所涉及到的所有英语单词,能更好的帮助您快速理解php编程语言,让您学习php编程语言的速度快人十倍。

PHP:HyperText Proprocessor hosts:hosts文件DNS:Domain Name Server域名服务器load:装载Module:模块LoadModule:装载模块File:文件Match:匹配FilesMatch:文件匹配AddType:添加类型application:应用程序Info:Information,信息Ini:Initiate,初始化Dir:Directory目录Time:时间zone:时区timezone:时区extension:扩展Option:选项Order:顺序Allow:允许Deny:拒绝Override:覆盖Index:索引,标识,首页DirectoryIndex:目录默认页Server:服务器Alias:昵称,别名ServerAlias:服务器别名VirtualHost:虚拟主机ServerName:服务器名Root:根,根目录DocumentRoot:文档根目录Short_open_tag:短标记isset:是否设置unset:取消设置echo:输出get postrequest:需要,要求,请求global:全球的,整体的method:方式,方式location:地址,网址request_order:请求顺序remote:远端的self:自身的define:定义constant:常量version:版本dir:目录file:文件line:行int:整数float:浮点string:字符串bool:boolean,布尔array:数组object:对象null:空resource:资源dec:decimal,十进制bin:binary,二进制oct:octal,八进制hex:hexadecimal,十六进制double:双重的,两倍的real:实数key:键,关键value:值var_dump:显示数据信息gettype:获取类型settype:设置类型empty:空的if:如果else:否则break:退出continue:继续while:当...时foreach:对...的每一个(进行遍历)switch:转换,切换die:死,停止exit:退出sleep:睡觉include:包含require:要求once:一次return:返回error:错误warning:警告notice:提示strict:严格的user:用户trigger:触发,引发display:显示on:打开off:关闭log:日志,记录report:报告parameter:形参argument:实参function:函数call:调用exists:存在print:打印trim:修剪,调整implode:崩溃,瓦解explode:爆炸,爆发,激增substr:截取子字符串strchr:strrchr:replace:替换strtolower:转换为小写strtoupper:转换为大写position:位置slash:斜线,反斜杠time:时间microtime:微型时间date:日期strtotime:字符转换为时间diff:different,不同的,差异的max:最大min:最小round:圆的,完整的,使成为整数rand:random,随机的abs:absolute,绝对的ceil:向上取整floor:向下取整each:每一个list:列表,列出来current:现在的,当前key:键,键名,关键next:下一个,后一个prev:previous上一个,前一个reset:恢复,重置end:结尾,最后,终止pop:popup,弹出,取出,发射push:推入,挤压,压入shift:移动,改变,换挡,轮班,转换slice:切开,割splice:接合,衔接,拼接sort:排序shuffle:打乱count:数量,计数reverse:反转merge:合并,融合,兼并sum:总和,求和range:范围new:新的,创建class:类public:公开的protected:受保护的private:私有的this:自己,这个static:静态的self:自身,自己的parent:父母的,construct:构造,建造,构建destruct:毁灭,摧毁extend:扩展,延伸final:最后的abstract:抽象的interface:接口implement:实现,实施,执行tostring:转换为字符串invoke:援引,引起,求助,调用instance:实例Model:模型View:视图Controller:控制器PDO:PHP Data Object,php数据对象query:查询exec:execute,执行close:关闭lastinsertid:最后的插入id attribute:属性errorcode:错误代号errorinfo:错误信息errmode:错误模式exception:异常rowcount:行数columncount:列数fetch:取出,取得prepare:准备execute:执行session:会话cookie:setcookie:设置cookielifetime:生命周期path:路径domain:域名secure:安全maxlifetime:最大生命周期probability:可能性divisor:除数,分母handler:处理器save:保存,存储auto_start:自动开始image:图片truecolor:真彩色allocate:分配fill:填充size:尺寸mime:多用途的网际邮件扩展协议destroy:毁灭copy:拷贝resample:取样mkdir:创建目录opendir:打开目录readdir:读取目录closedir:关闭目录rename:重命名unlink:删除目录或文件realpath:完整路径BaseName:基本文件名DirName:目录名file_get_contents:获得文件内容file_put_contents:写入文件内容fopen:打开文件ftell:获取文件指针位置fseek:设置文件指针位置fread:读取文件内容fgetc:读取一个字符fgets:读取一行或本行中指定长度的字符fwrite:写入文件内容fclose:关闭文件filemtime:文件最后修改时间filesize:文件大小file_exists:文件是否存在accept:接收,接受accept-language:可接受语言encoding:编码user-agent:用户代理(信息)connection:连接keep-alive:保持活动状态found:已发现,已找到forbidden:禁止internal:内部的content-type:内容类型socket:套接字abstract ----------抽象的access ----------存取,访问account ----------账户action ----------动作active----------活动的activate----------激活adapter----------适配器address----------地址aggregation----------聚合,聚集algorithm----------算法alias----------别名align----------排列,对齐allocate----------分配,配置allocator----------分配器annotation----------注解,评注appearance----------外观append----------附加的application----------应用程序architecture----------架构,体系结构argument----------引数(传给函数的值)array----------数组assembly----------配件assert----------断言assign----------赋值assignment----------分配associated----------相关联的asynchronous----------异步的atomic----------原子attribute----------特性audio----------音频authorization----------授权background----------背景,后台backup----------备份bandwidth----------带宽batch----------批处理binary----------二进制binding----------绑定bit----------位bitmap----------位图bitwise----------按位block----------区块,语句块bookkeeping----------簿记boolean----------布尔值border----------边框boxing----------装箱brace----------大括号bracket----------中括号breakpoint----------断点bug----------臭虫build----------编连bus----------总线business----------业务buttons----------按钮byte----------位元组cache----------高速缓存calender----------日历call----------调用callback----------回调casting----------转型catalog----------目录chain----------链character----------字符checkpoint----------检查点class----------类classification----------分类clause----------子句cleanup----------清理client----------客户clipboard----------剪贴板clique----------最大团clone----------克隆collection----------集合comment----------注释commit----------提交communication----------通讯compatible----------兼容complier----------编译器component----------组件composition----------复合,组合concept----------概念concrete----------具体concurrency----------并发机制configuration----------配置,组态connection----------连接console----------控制台constant----------常量constraint----------约束construct----------构造constructor----------构造器container----------容器containment----------包容context----------环境,上下文control----------控件convex hull----------凸包cookiecopy----------拷贝cover----------覆盖create/creation----------创建,生成cryptography----------密码cube----------多维数据集cursor光标custom自定义data数据database数据库dataset数据集dictionaries字典efficiency效率efficient高效encapsulation封装engine引擎entiy实体enumeration枚举enumerators枚举器equal相等equality相等性error log错误日志evaluate评估event事件evidence证据exception异常exit退出explicit显示export导出expression表达式feature特征fetch提取field字段file文件filter筛选finalization终结finalizer终结器firewall防火墙firmware固件flag标记flush刷新font字体form窗体fragmentation碎片framework框架function函数functionality功能functor仿函数game游戏generate生成generic一般的,通用的genericity泛型getter取值函数global全局grant授权granularity粒度group组,群handle句柄handler处理器hard disk硬盘hardware硬件heap堆hierarchy层次结构,继承体系hook钩子hyperlink超链接icon图标identifier标识符image图像implement实现implementation实现品implicit隐式import导入index索引information信息infrastructure基础设施inheritance继承机制initialization初始化initialize初始化inline内联instance实例instantiation实体化integrity完整性integrate整合,集成interacts交互interface接口interoperability互操作性interpreter解释器introspection自省invariants不变性invoke调用item项,条款iterate迭代iteration迭代iterative反复的iterator迭代器key建laser激光level阶,级library库lifetime生命周期link连接linkage连接linker连接器list列表livelock活锁load加载loader载入器local局部的lock锁log日志login登录loop循环lvalue左值macro宏maintain维护manifest清单manipulator操纵器marshal列集matching匹配member成员memory内存menu菜单message消息metadata元数据metaprogramming元编程method方法micro微middleware中间件modeling建模modem调制解调器modifier修饰符module模块mouse鼠标multiuser多用户mutable可变的mutex互斥元namespace命名空间native本地的network网络object对象operand操作数operator运算符operation操作optimizer优化器option选项overflow溢出overhead额外开销overload重载override重新定义package包packaging打包palette调色板parallel并行parameter形参parameterize参数化parent class父类parentheses圆括号parse解析parser解析器part零件,部件pattern模式performance性能persistence持久性pixel像素placeholder占位符platform平台pointer指针poll轮询polymorphism多态pooling池化pop up弹出式port端口postfix后缀precedence优先序prefix前缀preprocessor预处理器print打印printer打印机procedure过程式化的process进程profile评测profiler效能评测器program程序programer程序员programming编程,程序设计project项目,工程property属性protocol协议qualifiendqualifier修饰符quality质量queue队列radian弧度raise引发range范围rank等级raw未处理的readonly只读record记录recordset记录集recursion递归refactoring重构refer引用reference参考reflecction反射register寄存器remote远程represent表述resolution解析过程result set结果集return返回revoke撤销robust健壮robustness健壮性routine历程row行rowset行集runtime运行期rvalu右值satisfiability可满足性save保存savepoint保存点scalable可扩展的schedule调度scheduler调度程序schema模式scope作用域,生存空间screen屏幕search查找semantics语义semaphore信号量serial串行serialization序列化server服务器session会话setter设值函数sibling同级signature签名slider滑块slot槽snapshot截屏图software软件sorting排序specialization特化specification规范splitter切分窗口stack堆栈stateless无状态的statement语句。

设置PHP开发环境外文翻译(绿皮书)

设置PHP开发环境外文翻译(绿皮书)

设置PHP开发环境外文翻译(绿皮书)大连交通大学2013届本科生毕业设计(论文)外文翻译外文原文Setting Up the PHP Development EnvironmentGetting a working development environment put together can be intimidating, especially for the absolute beginner.To follow along with the project in this boo k, you’ll need to have access to a workinginstallation of Apache, PHP, and MySQL, preferably on your local machine. It’s alwaysdesirable to test locally, both for speed and security. Doing this both shelters your work-in-progress from the open Internet and decreases the amount of time spent uploading files to an FTP server and waitingfor pages to reload.Why You Need Apache, MySQL, and PHPPHP is a powerful scripting language that can be run by itself inthe command line of any computer with PHP installed. However, PHP alone isn't enough in order to build dynamic web sites. To use PHP on a web site, you need a server that can process PHP scripts. Apache is a free web server that, once installed on a computer, allows developers to test PHP scripts locally; this makes it an invaluable piece of your local development environment.Additionally, dynamic websites are dependent on stored information that can be modified quickly and easily; this is the main difference between a dynamic site and a static HTML site. However, PHP doesn’t provide a simple, efficient way to store data. This is wherea relational database management system like MySQL comes into play. This book’s examples rely on MySQL; I chose this database because PHP provides native support for it and the database is free, open-source project.It runs in both 32-bit and 64-bit environments, but on Windows the only official distribution is 32-bit, requiring Windows 32-bit compatibility mode to be enabled while using IIS in a 64-bit Windows environment. There is a third-party distribution available for 64-bit Windows. PHP is a general-purpose scripting language that is especially suited for web development. PHP generally runs on a web server, taking PHP code as its input and creating web pages as output. It can also be used for command-line scripting and client-side GUI applications. PHP can be deployed on most web servers, many operating systems and platforms, and can be used with many relational database management systems. It is available free of charge, and the PHP Group provides the complete source code for users to build, customize and extend for their own use. PHP primarily acts as a filter, taking input from a file1大连交通大学2013届本科生毕业设计(论文)外文翻译or stream containing text and/or PHP instructions and outputsanother stream of data; most commonly the output will be HTML. It can automatically detect the language of the user. From PHP 4, the PHP parser compiles input to produce byte code for processing by the Zend Engine, giving improved performance over its interpreter predecessor At the time I write this, PHP 5.2.9 is the latest stable release available, but versions 5.3 and 6 are both scheduled for release in the near future. PHP 4 is still in use on a number of servers, but support has been discontinued. Many hosting companies let developer use either PHP 4 or PHP 5 on their sites.PHP OriginPHP originally stood for “Personal Home Page” and was released as a free, open source project. It began in 1994 as a set of Common Gateway Interface binaries written in the C programming language by theDanish/Greenlandic programmer Rasmus Lerdorf. Lerdorf initially created these Personal Home Page Tools to replace a small set of Perl scripts he had been using to maintain his personal homepage. The tools were used to perform tasks such as displaying his résumé and recording how muchtraffic his page was receiving. He combined these binaries with his Form Interpreter to create PHP/FI, which had more functionality. PHP/FI included a larger implementation for the C programming language and could communicate with databases, enabling the building of simple, dynamic web applications. Lerdorf released PHP publicly on June 8, 1995 to accelerate bug location and improve the code. This release was namedPHP version 2 and already had the basic functionality that PHP has today. This included Perl-like variables, form handling, and the ability to embed HTML. The syntax was similar to Perl but was more limited, simpler, and less consistent. Zeev Suraski and Andi Gutmans, two Israeli developers at the Technion IIT, rewrote the parser in 1997 and formedthe base of PHP 3, changing the language's name to the recursiveinitialism PHP:Hypertext Preprocessor. The development team officially released PHP/FI 2 in November 1997 after months of beta testing. Afterwards, public testing of PHP 3 began, and the official launch came in June 1998. Suraski and Gutmans then started a new rewrite of PHP's core, producing the Zend Engine in 1999. They also founded Zend Technologies in Ramat Gan, Israel. On May 22, 2000, PHP 4, powered bythe Zend Engine 1.0, was released. On July 13, 2004, PHP 5 was released, powered by the new Zend Engine II. PHP 5 included new features such as improved support for object-oriented programming, the PHP Data Objects extension (which defines a lightweight and consistent interface for accessing databases), and numerous performance enhancements. The most recent update released by The PHP Group is for the older PHP version 4 code branch. As of August, 2008 this branch is2大连交通大学2013届本科生毕业设计(论文)外文翻译up to version 4.4.9. PHP 4 is no longer under development nor willany security updates be released. In 2008, PHP 5 became the only stable version under development. Late static binding has been missing from PHPand will be added in version 5.3. PHP 6 is under development alongside PHP 5. Major changes include the removal of register_globals, magic quotes, and safe mode. The reason for the removals was becauseregister_globals had given way to security holes, and magic quotes had an unpredictable nature, and was best avoided. Instead, to escape characters, magic quotes may be substituted with the addslashes() function, or more appropriately an escape mechanism specific to the database vendor itself like mysql_real_escape_string() for MySQL.How PHP WorksPHP is generally used as a server-side scripting language; it is especially well-suited for creating dynamic web pages. The scripting language features integrated support for interfacing with databases such as MySQL, which makes it a prime candidate for building all manner of web applications, from simple personal web sites to complex enterprise-level applications. Unlike HTML, which is parsed by a browser when a page loads, PHP is preprocessed by the machine that serves the document (this machine is referred to as a server). All PHP code contained with the document is processed by the server before the document is sent to the visitor’s browser. PHP is a scripted language, which is another great advantage for PHP programmers. Many programming languages require that you compile files into machine code before they can be run, which is a time-consuming process. Bypassing the need to compile means you’re able to edit and test code much more quickly. Because PHP is a server-side language, running PHP scripts on your local machine requiresinstalling a server on your local machine, as well. The examples in this book rely on the Apache web server to deliver your web pages.Serving web pages with Apache HTTP Server is the most popular web server on the web; it hosts nearly half of all web sites that exist today. Apache is an open-source project that runs on virtually all available operating systems.1 Apache server is a community-driven project, with many developers contributing to i ts progress. Apache’s open-source roots also meansthat the software is available free of charge, which probably contributes heavily to Apache’soverwhelming popularity relative to its competitors, including Microsoft’s IIS and Google’sGWS, among others. On the Apache web site (), Apache HTTP Server is described as “an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows NT. The goal of this project is to provide a secure, efficient, and extensible server that provides HTTP services in sync with the current3大连交通大学2013届本科生毕业设计(论文)外文翻译HTTP standards.”Installing PHPApache, and MySQL (the Hard Way).One of the biggest hurdles for new programmers is starting. Before you can write your first line of PHP,you must first download Apache and PHP, and usually MySQL, and thenfight through installation instructions that are full of technicaljargon you might not understand yet. This experience can leave many developers feeling unsure of themselves, doubting whether they have installed the required software correctly. In my own case, this hurdle kept me from learning programming for months, even though I desperately wanted to move beyond plain ol’ HTML. I unsuccessfully attempted to install PHP on my local machine not once, but three different times before I was able to run my first PHP command successfully.Fortunately, the development community has responded to thefrustration of beginning developers with several options that take all the pain out of setting up your development environment, whether you create applications for Windows, Mac, or Linux machines. These options include all-in-one solutions for setting up Apache, MySQL, and PHP installations. The most common all-in-one solution is a program called “XAMPP”, which rolls Apache,MySQL, PHP, and a few other useful tools together into one easy installer. XAMPP is free and available for Windows, Mac, and Linux, so this book assumes you will use it as your development environment.Keywords and Language syntaxAs with many scripting languages, PHP scripts are normally kept as human-readable source code, even on production web servers. In this case, PHP scripts will be compiled at runtime by the PHP engine, which increases their execution time. PHP scripts are able to be compiledbefore runtime using PHP compilers as with other programming languages such as C (the language PHP and its extensions are written in). Code optimizersPHP is similar to most high level languages that follow the C style syntax. If conditions, for and while loops, and function returns are similar in syntax to languages such as C, C++, Java and Perl. PHP stores whole numbers in a platform-dependent range. This range is typicallythat of 32-bit signed integers. Unsigned integers are converted valuesin certain situations; this behavior is different from other programming languages. Integer variables can be assigned using decimal (positive and negative), octal, and hexadecimal notations. Floating point numbers are also stored in a platform-specific range. They can be specified using floating point notation, or two forms of scientific notation. PHP has a native Boolean type that4大连交通大学2013届本科生毕业设计(论文)外文翻译is similar to the native Boolean types in Java and C++. Using the Boolean type conversion rules, non-zero values are interpreted as true and zero as false, as in Perl and C++. The null data type represents a variable that has no value. The only value in the null data type is NULL. Variables of the “resource” t ype represent references to resourcesfrom external sources.These are typically created by functions from a particular extension, and can only be processed by functions from the same extension; examplesinclude file, image, and database resources. Arrays can contain elements of any type that PHP can handle, including resources, objects, and even other arrays. PHP also supports strings, which can be used with single quotes, double quotes, or heredoc syntax.Server-Side vs. Client-Side ScriptingThe Internet features two main kinds of scripting: server-side and client-side. Client-side scripting is comprised mainly of JavaScript, which is responsible for many of the web features that you can actually see happening, such as pop-up windows, some animations, and other site features like drop-down menus. The reason this is called “client-side” scriptingbecause the code is executed on the user’s machine, after the page has been loaded. Usingclient-side scripts enables you to make changes to a page without requiring a page refresh; it also facilitates initial form validation and simplifies making improvements to the user interface. However, using client-side scripts requires that the users have JavaScript turned on or that their browsers support the script you have written. This means you should not use client-side scripts for user authentication or the handling of anything sensitive, due to the user’s ability to modifyand/or disable your client-side scripts.Server-side scripting is performed on the site`s hosting server before the page isdelivered to the user. This means that any changes that must be made by the script require a page refresh. Using server-side scripting is great for user authentication, saving changes to database information, retrieving entries for display, and many other tasks. The downside of server-side scripts lies mainly in the required page refresh. Because the script is processed before it is delivered to the browser, the user doesn’t have access to the inner workings. Thismakes server-side scripts the best choice for handling any sensitive information.5大连交通大学2013届本科生毕业设计(论文)外文翻译中文翻译设置PHP开发环境对于一个不折不扣新手来说,将一个工作中的开发环境放在一起是可怕的。

php常用英语范文

php常用英语范文

php常用英语范文程序员每天都要和英语打交道,但是如果英语不好,就真的很难受。

但是编程又不是英语,没有英语那么多的词汇,为此了以下的php常用英语,希望对大家编程有帮助!更多内容请关注!Data Structures根本数据构造 Dictionaries字典 Priority Queues堆 Graph Data Structures图 Set Data Structures集合Kd-Trees线段树Numerical Problems数值问题 Solving Linear Equations线性方程组 Bandwidth Reduction带宽压缩 Matrix Multiplication 矩阵乘法 Determinants and Permanents行列式Linear Programming线性规划 Random Number Generation随机数生成Factoring and Primality Testing因子分解/质数判定Arbitrary Precision Arithmetic高精度计算 Knapsack Problem背包问题Discrete Fourier Transform离散Fourier变换Combinatorial Problems组合问题 Sorting排序 Searching查找Median and Selection中位数 Generating Permutations排列生成 Generating Subsets子集生成 Generating Partitions划分生成 Generating Graphs图的生成 Calendrical Calculations日期 Job Scheduling工程安排 Satisfiability可满足性Graph Problems -- polynomial图论-多项式算法 Connected Components连通分支 Topological Sorting拓扑排序 Minimum Spanning Tree最小生成树 Shortest Path最短路径Transitive Closure and Reduction传递闭包 Matching匹配Eulerian Cycle / Chinese Postman Euler回路/中国邮路Edge and Vertex Connectivity割边/割点 Network Flow网络流Planarity Detection and Embedding平面性检测和嵌入Graph Problems -- hard图论-NP问题 Clique最大团Independent Set独立集 Vertex Cover点覆盖Traveling Salesman Problem旅行商问题 Hamiltonian Cycle Hamilton回路 Graph Partition图的划分 Vertex Coloring染色Edge Coloring边染色 Graph Isomorphism同构 Steiner Tree Steiner树Feedback Edge/Vertex Set最大无环子图 Computational Geometry计算几何 Convex Hull凸包 Triangulation三角剖分Voronoi Diagrams Voronoi图Nearest Neighbor Search最近点对查询 Range Search范围查询 Point Location位置查询 Intersection Detection碰撞测试Bin Packing装箱问题Medial-Axis Transformation中轴变换 PolygonPartitioning多边形分割 Simplifying Polygons多边形化简Shape Similarity相似多边形 Motion Planning运动规划Maintaining Line Arrangements平面分割 Minkowski Sum Minkowski和Set and String Problems集合与串的问题 Set Cover集合覆盖 Set Packing集合配置 String Matching模式匹配Approximate String Matching模糊匹配 Text Compression压缩 Cryptography密码Finite State Machine Minimization有穷自动机简化Longest Common Substring最长公共子串 Shortest Common Superstring最短公共父串 DP——Dynamic Programming——动态规划 recursion ——递归A2A integration A2A整合 abstract抽象的abstract base class (ABC)抽象基类 abstract class抽象类abstraction抽象、抽象物、抽象性 aess存取、访问 aess level访问级别 aess function访问函数 aount账户 action动作activate激活 active活动的actual parameter实参 adapter适配器 add-in插件 address 地址address space地址空间address-of operator取地址操作符 ADL (argument-dependent lookup)ADO(ActiveX Data Object)ActiveX数据对象 aggregation 聚合、聚集 algorithm 算法 alias 别名 align 排列、对齐allocate 分配、配置 allocator分配器、配置器 angle bracket 尖括号 annotation 注解、评注API (Application Programming Interface) 应用(程序)编程接口app domain (application domain)应用域 application 应用、应用程序application framework 应用程序框架 appearance 外观append 附加architecture 架构、体系构造 archive file 归档文件、存档文件argument引数(传给函式的值)。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

中文5915字,3600单词,17000英文字符本科毕业设计(论文)外文参考文献译文及原文学院信息工程学院专业信息工程(电子信息工程方向) 年级班别学号学生姓名指导教师目录外文参考文献译文1为什么选择PHP ......................................... 错误!未定义书签。

2如果你是编程新手 ...................................... 错误!未定义书签。

3写一个基本的PHP程序 .................................. 错误!未定义书签。

4编程语法 .............................................. 错误!未定义书签。

5嵌入式语言如何工作 .................................... 错误!未定义书签。

6服务端和客户端脚本 .................................... 错误!未定义书签。

7运行你的程序 .......................................... 错误!未定义书签。

外文参考文献原文1Why PHP? ............................................... 错误!未定义书签。

2If You Are New to Programming .......................... 错误!未定义书签。

3Writing a Basic PHP Program ............................ 错误!未定义书签。

4Programming Syntax ..................................... 错误!未定义书签。

5How Embedded Programming Works ......................... 错误!未定义书签。

6Server-side Versus Client-side Scripting ............... 错误!未定义书签。

7 Running Your New Program .............................. 错误!未定义书签。

11 为什么选择PHP对于Web编程来说,PHP是一个很好的选择。

它较其它语言(包括其它面向Web 的语言)有许多优点。

为了得到一个清晰的理解(和常见的面向Web的语言相比),让我们将它们比较一下。

ASP是微软的网络开发环境(它本身不是一门开发语言,因为它允许程序员在ASP 中选择其它语言进行开发,如VBScript或JScript。

)ASP虽然简单,但它太过于简单了,以至于不能使用更复杂的逻辑和算法。

除了ASP的过分简单,很多公司发现很难在微软的ASP许可证上节约成本。

即使不考虑硬件成本,微软的Web服务器就要数千美元,而基于UNIX操作系统的、可运行PHP的Web服务器则是免费的。

另一种Web使用的知名语言是Sun Microsystems公司的Java。

Java是平台独立的语言(在一个系统上用Java开发的程序可以不经过任何修改,就可以运行在其它系统上)。

尽管Java的确有它的优点,但它在开发时间、开发成本和执行速度上却有明显的劣势。

Java开发是耗时的,因为Java工程要遵循严格的规则(Java强制的),这需要进行大量的规划。

另外,Java开发周期长,费用成本高,Java程序员的待遇也较高。

因此Java程序开发的成本远远高于其它语言开发的成本。

通过我们的比较可以看出,即使项目开发结束后,以Java语言写的程序在运行时所花费的时间比其它语言的时间还要长。

总的来说,和Java相比,PHP的表现很出色。

一个相似的工程以PHP语言开发,要比用Java开发节省两三倍的时间。

最重要的是,虽然最终的程序都可以运行多种平台上(如Java),而PHP的程序则运行的更快。

另一种开发Web程序的常用语言是Perl。

Perl与PHP一样,是一个可运行在多个平台上的开源项目。

事实上,Perl的历史远远要比PHP长。

在PHP之前,Perl被认为是最好的Web开发语言。

然而,在过去的几年中,在Web开发领域,PHP赢得了比Perl 更好的口碑。

因为PHP语言本身集成了大量的功能模块,而要在Perl中使用这些功能,你就不得不单独下载许多额外的功能模块。

这样,当程序从一个系统转移到另一个系统时,就会容易产生问题,因为Perl不得不从自己的CPAN上下载相应的功能模块。

最后要比较的语言是C。

C语言已经存在很长的时间了;它已被用在各种各样的计算机中,从大型主机到个人PC都可见到它的身影。

如果你了解C语言的话,你就会知道用C语言开发Web程序会存在一些问题。

为了用C语言开发一个Web程序,在你着手构思你的实际任务时,你将不得不着手实现所有Web程序本身就应该具备的功能(如采集HTML表单提交的数据)。

而PHP语言提供了所有的Web常用或者并不是很常用的功能,可以允许程序员将更多的精力放在实际的任务中。

就其它的Web开发语言与PHP语言之间的比较而言,它们之间还存在很多不同。

在Internet上将PHP与Java,Perl,ASP等语言进行比较的文章也很多。

但是一旦你拥有了PHP的编程经验,你可能就会发现,在选择开发语言时,你会努力的说服你的客户或老板,允许你使用PHP来进行开发,而不是选择其它的语言。

如果出现问题,你可以通过搜索Internet找到大量基于这些问题的有用信息。

PHP的使用是没有限制的。

早期的版本使用的是单独的跟踪程序。

而随着时间的推移,这个简单的跟踪程序已经被包含在语言的内部了。

PHP的主要用途,当然不只是用来跟踪的了;它还可以做许多其它的事情。

为了让你理解PHP可以做什么,下面介绍了一些PHP的常见用途:•反馈表单•购物车和其它类型的电子商务系统•用户注册,访问控制,以及在线订阅服务•客户登记•讨论和留言板2如果你是编程新手如果你是一个从来没有写过程序的新手,这个想法可能有点吓人。

大多数程序员可能会告诉你(如果他们愿意承认),他们刚开始学习编程的时候,也有点无从下手。

然而,编程的过程根本不是那么难,相反却很享受,因为你不需要有多高的智商来适应它。

当你写程序的时候,你的主要目的就是把你的想法翻译成计算机能够识别的语言。

例如,如果你是教人如何做汉堡包,你会首先描述将牛肉做成牛肉饼的过程。

然后,你会告诉他如何把汉堡包放在烤架上,烤多长时间,最后,如何把它们拿下来。

当然,仅仅因为你能描述制作汉堡包的过程,并不意味着PHP能够在任何时间、任何地点为你做任何事情。

重点是,如果你能像我刚才描述制作汉堡包的过程那样,描述你的想法及思路,你就可以写程序。

写程序的过程就是告诉PHP如何做事情的过程。

当你读完本文的时候,你就会明白围绕在PHP程序背后的所有概念,这些概念就像描述制作汉堡包的过程一样。

对于本文,你读的越透,你明白的概念就越多,你向PHP描述的任务就越准确。

因此,如果你很快学会用PHP程序来实现你的需求和想法,你就不会再感觉到烦恼了。

整体说来,有些编程问题可能是非常复杂的。

例如,创建一个购物车,那并不是一个简单的事任务。

然而,你可以将这个大任务分成几个小任务。

这些小任务可能仅仅包括添加和删除的操作,而添加和删除的操作还可以被分解成更小的任务。

你可以看到,不管任何任务,无论它有多复杂,只要可以分解,分解后的任务简单到不需要再对它进行分解了,你就可以实现这个任务。

当你创建更复杂的程序时,你就会对这个过程有更加细致的体会了。

3写一个基本的PHP程序在我们开始写一个实际程序的时候,要看看创建程序的步骤。

这些步骤并不复杂;实际上,这个过程和你创建一个HTML页面,并将它同步到你的服务器上的过程基本一致。

和创建一个HTML页面不同,创建一个PHP程序,你要面对的是文件中的代码,而不是那些所见即所得(WYSIWYG)的内容。

如果你要利用这些所见即所得的编辑器开发程序(如微软的FrontPage,Macromedia Dream-Weaver,微软Word等),你可能还要花费一些时间来研究代码。

但令人兴奋的是,没有人也没有任何理由要求你,不能使用所见即所得的编辑器来编辑程序。

然而,你可能会失望的发现,许多所见即所得的编辑器会修改或删除PHP 文件中的代码。

积于这个原因,分析你的编辑器是如何处理PHP代码的,这很重要。

如果你想用你的编辑器来进行这种测试,要先创建一个新文件,保存,后缀名为.php。

然后,切换到编辑器的源码视图,或在一个独立的其它编辑器中打开这个文件(如记事本等),输入接下来本文要引用的代码,并确保没有任何错误。

当你输入完成后,保存文件并切换回WYSIWYG编辑器视图。

如果你看到你的PHP 代码,不用管它,继续键入几行文字。

如果你想添加一些Web页面中常用的元素,如表格和图片等,就请继续插入这些内容,保存,并关闭WYSIWYG编辑器。

现在,在记事本中打开该文件,看看你的PHP代码是否发生了变化,包括代码格式上的改变,特殊字符的转换(如< &lt;)以及完全被删除的代码。

你可能会发现PHP代码被以某种方式改变了。

因为PHP代码对一些WYSIWYG编辑器导致的变化是敏感的,如果你在写PHP代码的时候,使用WYSIWYG编辑器,这就很难让人理解了。

PHP社区不会因为这个原因,而建议你不要使用WYSIWYG编辑器,因为使用这样的编辑器有时还是可以加快程序的开发速度的。

现在,当你读代码或者测试本文中的程序时,请试着习惯使用这些纯文本编辑器吧。

当你习惯使用纯文本编辑器的时候,再使用其它的编辑器,那就容易上手的多了。

到那时,你就可以识别出编辑器自身生成的代码,也就能更容易的找出提高你工作效率的方法了。

不管你现在处理PHP代码的编辑器是什么,如果你正在用的是WYSIWYG编辑器,我建议你使用如记事本这样的纯文本编辑器,或者一些带有语法加亮功能的纯文本编辑器。

这些编辑器可以保证你的代码就像刚输入时的一样(WYSIWYG编辑器倾向于以它自己的规则来格式化你的代码,而这种功能对于编辑PHP代码来说并不需要)。

即使你的编辑器没有改变你的PHP代码,但如果它不是一个严格基于文本的编辑器,仍然会在随后的运行中可能会出现问题。

这是创建和浏览HTML文件的一般过程:1.创建HTML文件(添加文本,表格,图像,或声音等)。

2.保存HTML文件,命名为filename.html。

3.用FTP程序把你的文件上传到Web服务器。

4.用你的浏览器访问Web服务器上的文件(如,http:/ / /filename.html)。

相关文档
最新文档