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 | 行号