jdwx/web-pages
最新稳定版本:v1.0.0
Composer 安装命令:
composer require jdwx/web-pages
包简介
README 文档
README
PHP module for building up simple pages (e.g., for error messages)
Installation
You can require it directly with Composer:
composer require jdwx/web-pages
Or download the source from GitHub: https://github.com/jdwx/web-pages-php.git
Requirements
This module requires PHP 8.3 or later.
Usage
This module provides simplified ways to build various types of responses. It's mostly used for error pages or other places where a full application context may not be available or appropriate.
Here's a simple example:
$page = new SimpleHtmlPage(); $page->setTitle( 'Example Page' ); $page->addContent( '<p>This is an example page.</p>' ); echo $page;
<!DOCTYPE html> <html lang="en"> <head> <meta content="width=device-width, initial-scale=1.0" name="viewport"> <title>Example Page</title> <meta charset="UTF-8"> </head> <body><p>This is an example page.</p></body> </html>
(It won't be formatted quite like this because the editor for this file automatically reformats.)
Stability
This module is considered stable and is extensively used in production code, but in relatively low volume due to the nature of the functionality it provides.
The module has complete test coverage.
History
This module was refactored out of the jdwx/web-php module in November 2025.
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-11-28