【发布时间】:2014-05-03 20:11:47
【问题描述】:
我在我的项目中使用 joomla 3.0。然后我尝试开发自己的模块...
在模块主代码中我有这样的部分:
`<?php
defined('_JEXEC') or die('Direct Access to this location is not allowed.');
require_once('helper.php');
JHTML::stylesheet('styles.css','modules/mod_get_call/css/');
//require_once('recaptchalib.php');
$privatekey = "6Ldc2_ISAAAAAABrb****Gr9c_";
$resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field2"] );
$input = JFactory::getApplication()->input; // only once on each method
$form_send = $input->get('form_send', 'notsend');
switch($form_send){
case 'send':
$organization = $input->get('organization', 'No organization entered');
$phone = $input->get('phone', 'No phone entered');
$e_mail = $input->get('e_mail', 'No e_mail entered');
$skype = $input->get('skype', 'No skype entered');
$comment = $input->get('comment', 'No comment entered');
//JFactory::getApplication()->enqueueMessage(JText::_($organization), 'error');
if ($resp->is_valid == true)
$send = ModGetCallHelper::SendMail($organization, $phone, $e_mail, $skype, $comment);
else{
require(JModuleHelper::getLayoutPath('mod_get_call', 'wrong_input_tmplc'));
break;
}****`
一切正常,就在我提交 $e_mail 时,它没有 @ 符号,当我输入俄语字母时 - 我看到空变量。当我尝试写$_POST["e_mail"] - 一切都好。但是如何在 JFactory::getApplication()->input 中使用俄罗斯符号呢?我做错了什么?
【问题讨论】: