Home php教程 php手册 PHP例解Webzine编辑和发送二

PHP例解Webzine编辑和发送二

Jun 13, 2016 am 10:27 AM
php one two send and edit

接上一篇PHP例解Webzine编辑和发送(一) 清单 3:创建 HTML 表 $anchor "); } ?> 这个表以 HTML 模式开始和结束,但其大部分中间过程都处于PHP模式下。现在我们逐行分析这个示例。它以HTML模式开始(这是PHP的正常开始模式)。表的边框宽度为 1: 现在,切换到PHP模式: $anchor "); 下面的echoe语句将指定的字符串插入输出流(即,HTML网页的正文)中。所以可以使用这条语句插入整个表行。在字符串中使用"可以插入一个引号字符。上面计算出的$color和$anchor变量自动代入它们的引用位置: echo("

$anchor
"); for 循环的结束: } 再次从PHP模式返回HTML模式: ?> 类别菜单的HTML表的结束: 对程序创建过程的分析到此结束! 故事的表示 一旦选定一个故事,您就需要将这个故事的正文从故事文件打印到当前的网页上。(编辑模块author.php3 以正确的 HTML格式准备这个故事。)这是个简单的过程。在下面的代码段中,假定故事编号存储在变量$story 中。如果 $story 等于33,则这个故事的文件为 s33.txt。 $storyfile = fopen("s$story.txt","r"); fpassthru($storyfile); 在上例中,fopen函数打开一个文件,并返回该文件的一个句柄,然后通过赋值运算符将这个句柄保存在变量$storyfile 中。fpassthru函数将文件的内容复制到当前的输出设备(输出HTML文件),并自动关闭该文件。 内容预告 本文(第 1.2 部分)介绍了 Webzine 这个简单PHP应用程序的第一部分,并详细分析了几小段代码示例。(应用程序的这部分代码大小只有2K,所以没有许多大型的代码示例供我们选择!)这应该使您对PHP的强大功能有了很好的体验,但后面的内容还多着呢。 下一部分的篇幅与前面大致相同。我将说明故事菜单的表示是如何呈现在读者面前的,从而完成对发送模块的讨论。然后我将讨论允许作者提交故事的编辑模块。虽然编辑模块比发送模块大得多,但我们不会如此详细地讨论它:我们只需要说明与发送模块不同的那些有趣概念。 参考资源 PHP.net是 PHP语言的官方主页。在这里您可以免费下载PHP的最新版本,还可以查看PHP开发的发展方向。这里还有一个常见问题解答、一个手册以及许多其他资源。 PHPbuilder.com面向的是开发人员,其中包含大量的文章和代码样例、零活登记以及到PHP资源的链接。 Webmonkey的PHP部分包含有关PHP的大量入门级文章。
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

CakePHP Project Configuration CakePHP Project Configuration Sep 10, 2024 pm 05:25 PM

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

CakePHP Working with Database CakePHP Working with Database Sep 10, 2024 pm 05:25 PM

Working with database in CakePHP is very easy. We will understand the CRUD (Create, Read, Update, Delete) operations in this chapter.

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

To work on file upload we are going to use the form helper. Here, is an example for file upload.

CakePHP Routing CakePHP Routing Sep 10, 2024 pm 05:25 PM

In this chapter, we are going to learn the following topics related to routing ?

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

CakePHP Creating Validators CakePHP Creating Validators Sep 10, 2024 pm 05:26 PM

Validator can be created by adding the following two lines in the controller.

See all articles