本文整理汇总了PHP中xajax::errorHandlerOn方法的典型用法代码示例。如果您正苦于以下问题:PHP xajax::errorHandlerOn方法的具体用法?PHP xajax::errorHandlerOn怎么用?PHP xajax::errorHandlerOn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xajax
的用法示例。
在下文中一共展示了xajax::errorHandlerOn方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
define('JPATH_SITE', JPATH_ROOT);
define('JPATH_CONFIGURATION', JPATH_ROOT);
define('JPATH_LIBRARIES', JPATH_ROOT . DS . 'libraries');
define('JXPATH_BASE', JPATH_BASE . DS . 'includes');
// Make sure that Joomla! is not yet installed
if (file_exists(JPATH_CONFIGURATION . DS . 'configuration.php') && filesize(JPATH_CONFIGURATION . DS . 'configuration.php') > 10) {
header('Location: ../../index.php');
exit;
}
// System includes
require_once JPATH_LIBRARIES . DS . 'joomla' . DS . 'import.php';
require_once JPATH_BASE . DS . 'installer' . DS . 'helper.php';
// Require the xajax library
require_once JXPATH_BASE . DS . 'xajax' . DS . 'xajax.inc.php';
$xajax = new xajax();
$xajax->errorHandlerOn();
$xajax->registerFunction(array('getFtpRoot', 'JAJAXHandler', 'ftproot'));
$xajax->registerFunction(array('FTPVerify', 'JAJAXHandler', 'ftpverify'));
$xajax->registerFunction(array('instDefault', 'JAJAXHandler', 'sampledata'));
JError::setErrorHandling(E_ERROR, 'callback', array('JAJAXHandler', 'handleError'));
JError::setErrorHandling(E_WARNING, 'callback', array('JAJAXHandler', 'handleError'));
JError::setErrorHandling(E_NOTICE, 'callback', array('JAJAXHandler', 'handleError'));
require_once JPATH_SITE . DS . 'libraries' . DS . 'joomla' . DS . 'utilities' . DS . 'compat' . DS . 'compat.php';
/**
* AJAX Task handler class
*
* @static
* @package Joomla
* @subpackage Installer
* @since 1.5
*/
示例2: mainConfig
/**
* Finishes configuration parameters
*
* @return boolean True if successful
* @access public
* @since 1.5
*/
function mainConfig()
{
global $mainframe;
$vars =& $this->getVars();
// get ftp configuration into registry for use in case of safe mode
if ($vars['ftpEnable']) {
JInstallationHelper::setFTPCfg($vars);
}
// Check a few directories are writeable as this may cause issues
if (!is_writeable(JPATH_SITE . DS . 'tmp') || !is_writeable(JPATH_SITE . DS . 'installation' . DS . 'sql' . DS . 'migration')) {
$vars['dircheck'] = JText::_('Some paths may be unwritable');
}
// Require the xajax library
require_once JPATH_BASE . DS . 'includes' . DS . 'xajax' . DS . 'xajax.inc.php';
// Instantiate the xajax object and register the function
$xajax = new xajax(JURI::base() . 'installer/jajax.php');
$xajax->registerFunction(array('instDefault', 'JAJAXHandler', 'sampledata'));
// $xajax->debugOn();
$xajax->errorHandlerOn();
$doc =& JFactory::getDocument();
$doc->addCustomTag($xajax->getJavascript('', 'includes/js/xajax.js', 'includes/js/xajax.js'));
// Deal with possible sql script uploads from this stage
$vars['loadchecked'] = 0;
if (JRequest::getVar('sqlupload', 0, 'post', 'int') == 1) {
$vars['sqlresponse'] = JInstallationHelper::uploadSql($vars);
$vars['dataloaded'] = '1';
$vars['loadchecked'] = 1;
}
if (JRequest::getVar('migrationupload', 0, 'post', 'int') == 1 && JRequest::getVar('migrationUploaded', 0, 'post', 'int') == 0) {
jexit(print_r(JRequest::getVar('migrationUploaded', 0, 'post', 'int')));
$vars['migresponse'] = JInstallationHelper::uploadSql($vars, true);
$vars['dataloaded'] = '1';
$vars['loadchecked'] = 2;
}
if (JRequest::getVar('migrationUploaded', 0, 'post', 'int') == 1) {
$vars['migresponse'] = JInstallationHelper::findMigration($vars);
$vars['dataloaded'] = '1';
$vars['loadchecked'] = 2;
}
// $strip = get_magic_quotes_gpc();
if (isset($vars['siteName'])) {
$vars['siteName'] = stripslashes(stripslashes($vars['siteName']));
}
$folders = array('administrator/backups', 'administrator/cache', 'administrator/components', 'administrator/language', 'administrator/modules', 'administrator/templates', 'cache', 'components', 'images', 'images/banners', 'images/stories', 'language', 'plugins', 'plugins/content', 'plugins/editors', 'plugins/search', 'plugins/system', 'tmp', 'modules', 'templates');
// Now lets make sure we have permissions set on the appropriate folders
// foreach ($folders as $folder)
// {
// if (!JInstallationHelper::setDirPerms( $folder, $vars ))
// {
// $lists['folderPerms'][] = $folder;
// }
// }
return true;
}