introduction.html
来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 81 行
HTML
81 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Introduction</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="getting-started.html">Getting Started</a></div> <div class="next" style="text-align: right; float: right;"><a href="intro-whatcando.html">What can PHP do?</a></div> <div class="up"><a href="getting-started.html">Getting Started</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div> <div class="info"><h1>Introduction</h1><h2>Table of Contents</h2><ul class="chunklist chunklist_chapter"><li><a href="intro-whatcando.html">What can PHP do?</a></li></ul></div> <div id="intro-whatis" class="section"> <div class="info"><h1 class="title">What is PHP?</h1></div> <p class="para"> <acronym title="PHP: Hypertext Preprocessor">PHP</acronym> (recursive acronym for "PHP: Hypertext Preprocessor") is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. </p> <p class="para"> Nice, but what does that mean? An example: </p> <p class="para"> <div class="example"> <div class="info"><p><b>Example #1 An introductory example</b></p></div> <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"<br /> "http://www.w3.org/TR/html4/loose.dtd"><br /><html><br /> <head><br /> <title>Example</title><br /> </head><br /> <body><br /><br /> <span style="color: #0000BB"><?php<br /> </span><span style="color: #007700">echo </span><span style="color: #DD0000">"Hi, I'm a PHP script!"</span><span style="color: #007700">;<br /> </span><span style="color: #0000BB">?><br /></span><br /> </body><br /></html></span></code></div> </div> </div> </p> <p class="para"> Instead of lots of commands to output HTML (as seen in C or Perl), PHP pages contain HTML with embedded code that does "something" (in this case, output "Hi, I'm a PHP script!"). The PHP code is enclosed in special <a href="language.basic-syntax.html#language.basic-syntax.phpmode" class="link">start and end processing instructions <code class="code"><?php</code> and <code class="code">?></code></a> that allow you to jump into and out of "PHP mode." </p> <p class="para"> What distinguishes PHP from something like client-side JavaScript is that the code is executed on the server, generating HTML which is then sent to the client. The client would receive the results of running that script, but would not know what the underlying code was. You can even configure your web server to process all your HTML files with PHP, and then there's really no way that users can tell what you have up your sleeve. </p> <p class="para"> The best things in using PHP are that it is extremely simple for a newcomer, but offers many advanced features for a professional programmer. Don't be afraid reading the long list of PHP's features. You can jump in, in a short time, and start writing simple scripts in a few hours. </p> <p class="para"> Although PHP's development is focused on server-side scripting, you can do much more with it. Read on, and see more in the <a href="intro-whatcando.html" class="link">What can PHP do?</a> section, or go right to the <a href="tutorial.html" class="link">introductory tutorial</a> if you are only interested in web programming. </p> </div> </div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="getting-started.html">Getting Started</a></div> <div class="next" style="text-align: right; float: right;"><a href="intro-whatcando.html">What can PHP do?</a></div> <div class="up"><a href="getting-started.html">Getting Started</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?