PHP电子邮件脚本 - 需要建议 [英] PHP Email Script - Need advice

查看:73
本文介绍了PHP电子邮件脚本 - 需要建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我很好奇。我有一个PHP电子邮件脚本,我正在努力工作,我认为代码是正确的,但只需要第二双眼睛检查它。似乎在我的if elseif结构中出现了一些东西。该网站确实发送了正确的电子邮件,因为我有每个请求后面跟消息发送者的自动回复。这是我坚持的块:

Hello everyone, I''m curious about something. I have a PHP Email script that I''m trying to get working and I think the code is right but just need a second pair of eyes to check it. It seems something in my if elseif else structure is hosed. The site does indeed email properly because I have each request followed by an autoresponder to the message sender. This is the block I''m stuck on:

展开 | 选择 | Wrap | 行号

推荐答案

你的if结构完全脱落。你错过了一堆括号和分号。正确的if结构如下
Your if structure is completely off. You''re missing a bunch of brackets and semicolons. The correct if structure is as follows
展开 | 选择 | Wrap | 行号


我实际上使用case语句重写了这个,比if ifif更快else loop。
I actually re-wrote this using case statements instead, way faster than if elseif else loop.


这里是重写的代码块
And here is the re-written code block
展开 | 选择 | Wrap | 行号


这篇关于PHP电子邮件脚本 - 需要建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆