search
Homephp教程php手册用Socket发送电子邮件五

用Socket发送电子邮件五

Jun 13, 2016 am 10:27 AM
debugfunctionmessagesocketinformationsendshowusee-maildebug

显示调试信息
1 function show_debug($message, $inout)
2 {
3 if ($this-$#@62;debug)
4 {
5 if($inout=="in") //响应信息
6 {
7 $m="$#@60;$#@60;,;
8 }
9 else
10 $m="$#@62;$#@62; ,;
11 if(!ereg(" $", $message))
12 $message .= "$#@60;br$#@62;";
13 $message=nl2br($message);
14 echo "$#@60;font color=#999999$#@62;${m}${message}$#@60;/font$#@62;";
15 }
16 }
  这个函数用来显示调试信息。可以在$inout中指定是上传的指令还是返回的响应,如果为上传指令,则使用"out";如果为返回的响应则使用"in"。
第3行,判断是否要输出调试信息。
第5行,判断是否为响应信息,如果是,则在第7行将信息的前面加上"$#@60;$#@60; "来区别信息;否则在第10行加上 "$#@62;$#@62; "来区别上传指令。
第11-12行,判断信息串最后是否为换行符,如不是则加上HTML换行标记。第13行将所以的换行符转成HTML的换行标记。
第14行,输出整条信息,同时将信息颜色置为灰色以示区别。

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.