search
Homephp教程php手册使用Mason和PHP生成饭否图片插件

饭否的图片插件可用于论坛,博客,将用户的信息和一些最新动态用图片的形式表现出来。 我们如果需要自行开发此功能的话,需要设置某种格式(或某个地址)的图片采用脚本来处理。 在Perl中的话 例如可以使用Apache的LocationMatch或者FilesMatch指令来进行设

饭否的图片插件可用于论坛,博客,将用户的信息和一些最新动态用图片的形式表现出来。

我们如果需要自行开发此功能的话,需要设置某种格式(或某个地址)的图片采用脚本来处理。

在Perl中的话

例如可以使用Apache的LocationMatch或者FilesMatch指令来进行设置,让某个Perl模块来进行处理。

如果使用Mason的话,更为简单,不需要修改服务器,只需利用dhandler的特性,就可以让指定的脚本来处理。

基本流程如下:

使用Mason和PHP生成饭否图片插件

主要代码如下:

PHP的话,大同小异,例如可以在Apache里或者.htaccess文件设置:

 

PHP代码如下所示:

 

此时我们访问r23_0.jpg就可以出现我们需要的图片,用户可以使用http://php.hfahe.cn/r23_0.jpg,http://php.hfahe.cn/r23_1.jpg来取得uid为23的用户的不同样式的图片插件。

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor