本文整理汇总了PHP中xajax::setCharEncoding方法的典型用法代码示例。如果您正苦于以下问题:PHP xajax::setCharEncoding方法的具体用法?PHP xajax::setCharEncoding怎么用?PHP xajax::setCharEncoding使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xajax
的用法示例。
在下文中一共展示了xajax::setCharEncoding方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: xajax
<?php
define('XAJAX_DEFAULT_CHAR_ENCODING', 'windows-1251');
require_once $_SERVER['DOCUMENT_ROOT'] . '/xajax/xajax_core/xajax.inc.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/config.php';
global $xajax;
if (!$xajax) {
$xajax = new xajax('/xajax/promo_codes.server.php');
$xajax->configure('decodeUTF8Input', TRUE);
$xajax->configure('scriptLoadTimeout', XAJAX_LOAD_TIMEOUT);
$xajax->setCharEncoding('windows-1251');
$xajax->register(XAJAX_FUNCTION, 'checkPromoCode');
}
示例2: fecha
function fecha($var)
{
$final = date("Y/m/d", strtotime($var));
return $final;
}
function limpiar($String)
{
$String = str_replace(' ', ' ', $String);
/////###########importantisimo!! no borrar!!
//$String = str_replace('"','\"',$String);
$String = str_replace('"', '\\"', $String);
return $String;
}
$xajax = new xajax();
// Crea un nuevo objeto xajax
$xajax->setCharEncoding("utf-8");
// le indica la codificación que debe utilizar
$xajax->decodeUTF8InputOn();
// decodifica los caracteres extraños
$xajax->registerFunction("agregarFila");
//Registramos la función para indicar que se utilizará con xajax.
$xajax->registerFunction("cancelar");
$xajax->registerFunction("eliminarFila");
$xajax->registerFunction("guardar");
$xajax->registerFunction("fecha");
$xajax->registerFunction("asigna");
$xajax->registerFunction("limpiar");
$xajax->processRequests();
?>
<html>
示例3: xajax
<?php
define("XAJAX_DEFAULT_CHAR_ENCODING", "windows-1251");
require_once $_SERVER['DOCUMENT_ROOT'] . "/xajax/xajax_core/xajax.inc.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/config.php";
global $xajax;
if (!$xajax) {
$xajax = new xajax("/xajax/presscenter.server.php");
//$xajax->setFlag('debug',true);
$xajax->configure('decodeUTF8Input', true);
$xajax->configure('scriptLoadTimeout', XAJAX_LOAD_TIMEOUT);
$xajax->setCharEncoding("windows-1251");
$xajax->register(XAJAX_FUNCTION, "GetPeopleTeamInfo");
$xajax->register(XAJAX_FUNCTION, "DeletePhoto");
$xajax->register(XAJAX_FUNCTION, "ReorderTeam");
}
示例4: limpiar2
/////###########importantisimo!! no borrar!!
$String = str_replace(' ', " ", $String);
// $String = str_replace(' ','',$String);
$String = str_replace('"', '"', $String);
return $String;
}
function limpiar2($String)
{
//$String = str_replace(' ',' ',$String); /////###########importantisimo!! no borrar!!
//$String = str_replace(' '," ",$String);
$String = str_replace(" ", ' ', $String);
// $String = str_replace(' ','',$String);
//$String = str_replace('"','"',$String);
return $String;
}
$xajax->setCharEncoding("iso-8859-1");
// le indica la codificación que debe utilizar
$xajax->decodeUTF8InputOn();
// decodifica los caracteres extraños
$xajax->registerFunction("eliminar");
//Registramos la función para indicar que se utilizará con xajax.
$xajax->registerFunction("eliminarprofesor");
$xajax->registerFunction("fecha");
$xajax->registerFunction("ordenar");
$xajax->registerFunction("guardar");
$xajax->registerFunction("buscar");
$xajax->processRequests();
?>
<html>
<head>
示例5: dirname
function admin_xajax_live()
{
if (!$this->admin_xajax_live_flag) {
$this->admin_xajax_live_flag = true;
include_once dirname(__FILE__) . '/xajax.inc.php';
include_once dirname(__FILE__) . '/xajax.class.php';
global $admin_xajax_live;
$admin_xajax_live = new xajax();
$admin_xajax_live->setCharEncoding('utf-8');
$admin_xajax_live->decodeUTF8InputOn();
$admin_xajax_live->registerFunction('ChangeStatus');
$admin_xajax_live->registerFunction('AdminResponse');
$admin_xajax_live->registerFunction('AdminSound');
$admin_xajax_live->registerFunction('AdminDecline');
$admin_xajax_live->registerFunction('AdminChatHistory');
$admin_xajax_live->registerFunction('AdminPostdata');
$admin_xajax_live->registerFunction('EndChats');
$admin_xajax_live->registerFunction('GetEndChat');
$admin_xajax_live->registerFunction('AdminExit');
$admin_xajax_live->processRequests();
}
}
示例6: header
if (@$_GET['refresh'] == "yes") {
session_destroy();
header("location: charEncodingTest.php");
exit;
}
if (isset($_SESSION['useEncoding'])) {
$useEncoding = $_SESSION['useEncoding'];
}
if (isset($_SESSION['htmlEntities'])) {
$htmlEntities = $_SESSION['htmlEntities'];
}
if (isset($_SESSION['decodeUTF8'])) {
$decodeUTF8 = $_SESSION['decodeUTF8'];
}
$xajax = new xajax();
$xajax->setCharEncoding($useEncoding);
if ($htmlEntities) {
$xajax->setFlag("outputEntities", true);
}
if ($decodeUTF8) {
$xajax->setFlag("decodeUTF8Input", true);
}
$xajax->setFlag("debug", true);
$xajax->registerFunction("setOptions");
$xajax->registerFunction("testForm");
$xajax->processRequest();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
示例7: loadXajax
function loadXajax()
{
// Prevents xajax from loading twice if already loaded by jReviews or BlueFlame Platform
if (!class_exists('xajax') && !defined('XAJAX_LOADED') && !defined('XAJAX_VER')) {
define('XAJAX_LOADED', 1);
App::import('Vendor', 'xajax_05final' . DS . 'xajax_core' . DS . 'xajax.inc');
if (defined('MVC_FRAMEWORK_ADMIN')) {
$xajax = new xajax('index2.php?option=' . S2Paths::get('jreviews', 'S2_CMSCOMP') . '&task=xajax&no_html=1');
} else {
$xajax = new xajax();
}
$xajax->setCharEncoding(strtoupper(cmsFramework::getCharset()));
if (strtolower(cmsFramework::getCharset()) == 'utf-8') {
$decodeUTF8 = false;
} else {
$decodeUTF8 = true;
}
/* Set defaults from params */
$this->xajax_statusMessage ? $xajax->setFlag('statusMessages', true) : $xajax->setFlag('statusMessages', false);
$this->xajax_waitCursor ? $xajax->setFlag('waitCursor', true) : $xajax->setFlag('waitCursor', false);
$this->xajax_debug ? $xajax->setFlag('debug', true) : $xajax->setFlag('debug', false);
$decodeUTF8 ? $xajax->setFlag('decodeUTF8Input', true) : $xajax->setFlag('decodeUTF8Input', false);
$xajax->registerFunction('xajaxDispatch');
// ob_start('ob_gzhandler'); // Results in wrong encoding error ni certain servers
$xajax->processRequest();
$js = $xajax->getJavascript(S2_VENDORS_URL . 'xajax_05final' . _DS);
cmsFramework::addScript($js);
}
}
示例8:
$xajax->setRequestURI($BL->conf['path_url'] . "/");
if (ALP_DEBUG) {
$xajax->debugOn();
} else {
$xajax->debugOff();
}
if (ini_get('output_buffering') == NULL || ini_get('output_buffering') == 'Off') {
$xajax->cleanBufferOn();
} else {
$xajax->cleanBufferOff();
}
$xajax->errorHandlerOff();
$xajax->statusMessagesOn();
$xajax->waitCursorOn();
$xajax->exitAllowedOn();
$xajax->setCharEncoding(CHARSET);
$xajax->decodeUTF8InputOn();
$xajax->outputEntitiesOn();
$xajax->registerFunction("reload");
$xajax->registerFunction("updateBasket");
$xajax->registerFunction("toggleButtons");
$xajax->registerFunction("step1");
$xajax->registerFunction("step1_buyNow");
$xajax->registerFunction("step1_selectGroup");
$xajax->registerFunction("step1_selectProduct");
$xajax->registerFunction("step1_selectCycle");
$xajax->registerFunction("step1_addAddon");
$xajax->registerFunction("step1_removeAddon");
$xajax->registerFunction("step1_ShowGroups");
$xajax->registerFunction("step1_HideGroups");
$xajax->registerFunction("step1_ShowProducts");