本文整理汇总了PHP中stripslashes_deep函数的典型用法代码示例。如果您正苦于以下问题:PHP stripslashes_deep函数的具体用法?PHP stripslashes_deep怎么用?PHP stripslashes_deep使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了stripslashes_deep函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cf7bs_number_shortcode_handler
function cf7bs_number_shortcode_handler($tag)
{
$tag = new WPCF7_Shortcode($tag);
if (empty($tag->name)) {
return '';
}
$mode = $status = 'default';
$validation_error = wpcf7_get_validation_error($tag->name);
$class = wpcf7_form_controls_class($tag->type);
$class .= ' wpcf7-validates-as-number';
if ($validation_error) {
$class .= ' wpcf7-not-valid';
$status = 'error';
}
if ($tag->is_required()) {
$mode = 'required';
}
$value = (string) reset($tag->values);
$placeholder = '';
if ($tag->has_option('placeholder') || $tag->has_option('watermark')) {
$placeholder = $value;
$value = '';
}
if (wpcf7_is_posted() && isset($_POST[$tag->name])) {
$value = stripslashes_deep($_POST[$tag->name]);
} elseif (isset($_GET) && array_key_exists($tag->name, $_GET)) {
$value = stripslashes_deep(rawurldecode($_GET[$tag->name]));
}
$field = new CF7BS_Form_Field(array('name' => $tag->name, 'id' => $tag->get_option('id', 'id', true), 'class' => $tag->get_class_option($class), 'type' => wpcf7_support_html5() ? $tag->basetype : 'text', 'value' => $value, 'placeholder' => $placeholder, 'label' => $tag->content, 'options' => array('min' => $tag->get_option('min', 'signed_int', true), 'max' => $tag->get_option('max', 'signed_int', true), 'step' => $tag->get_option('step', 'int', true)), 'help_text' => $validation_error, 'size' => cf7bs_get_form_property('size'), 'grid_columns' => cf7bs_get_form_property('grid_columns'), 'form_layout' => cf7bs_get_form_property('layout'), 'form_label_width' => cf7bs_get_form_property('label_width'), 'form_breakpoint' => cf7bs_get_form_property('breakpoint'), 'mode' => $mode, 'status' => $status, 'readonly' => $tag->has_option('readonly') ? true : false, 'tabindex' => $tag->get_option('tabindex', 'int', true), 'wrapper_class' => $tag->name));
$html = $field->display(false);
return $html;
}
示例2: pop_handle_save
function pop_handle_save()
{
if (!isset($_POST[$this->id . '_options'])) {
return;
}
if (!current_user_can($this->capability)) {
return;
}
$options = explode(',', stripslashes($_POST['page_' . $this->id]));
if ($options) {
$existing_options = $this->get_options();
foreach ($options as $option) {
$option = trim($option);
$value = null;
if (isset($_POST[$option])) {
$value = $_POST[$option];
}
if (!is_array($value)) {
$value = trim($value);
}
$value = stripslashes_deep($value);
$existing_options[$option] = $value;
}
update_option($this->options_varname, $existing_options);
}
do_action('pop_handle_save', $this);
//------------------------------
$goback = add_query_arg('updated', 'true', wp_get_referer());
if (isset($_REQUEST['tabs_selected_tab']) && $_REQUEST['tabs_selected_tab'] != '') {
$goback = add_query_arg('tabs_selected_tab', $_REQUEST['tabs_selected_tab'], $goback);
}
wp_redirect($goback);
}
示例3: cf7bs_file_shortcode_handler
function cf7bs_file_shortcode_handler($tag)
{
$tag = new WPCF7_Shortcode($tag);
if (empty($tag->name)) {
return '';
}
$mode = $status = 'default';
$validation_error = wpcf7_get_validation_error($tag->name);
$class = wpcf7_form_controls_class($tag->type);
if ($validation_error) {
$class .= ' wpcf7-not-valid';
$status = 'error';
}
// size is not used since Bootstrap input fields always scale 100%
//$atts['size'] = $tag->get_size_option( '40' );
if ($tag->is_required()) {
$mode = 'required';
}
$value = (string) reset($tag->values);
$placeholder = '';
if ($tag->has_option('placeholder') || $tag->has_option('watermark')) {
$placeholder = $value;
$value = '';
} elseif (empty($value)) {
$value = $tag->get_default_option();
}
if (wpcf7_is_posted() && isset($_POST[$tag->name])) {
$value = stripslashes_deep($_POST[$tag->name]);
}
$field = new CF7BS_Form_Field(cf7bs_apply_field_args_filter(array('name' => $tag->name, 'id' => $tag->get_option('id', 'id', true), 'class' => $tag->get_class_option($class), 'type' => 'file', 'value' => '1', 'label' => $tag->content, 'help_text' => $validation_error, 'size' => cf7bs_get_form_property('size'), 'grid_columns' => cf7bs_get_form_property('grid_columns'), 'form_layout' => cf7bs_get_form_property('layout'), 'form_label_width' => cf7bs_get_form_property('label_width'), 'form_breakpoint' => cf7bs_get_form_property('breakpoint'), 'mode' => $mode, 'status' => $status, 'tabindex' => $tag->get_option('tabindex', 'int', true), 'wrapper_class' => $tag->name), $tag->basetype, $tag->name));
$html = $field->display(false);
return $html;
}
示例4: do_
protected function do_($action, $data, $content = '')
{
extract($data);
// Get widget type and number
$id_base = explode('-', $widget_id);
$widget_nr = array_pop($id_base);
$id_base = implode('-', $id_base);
// Get widget instance
$widget_key = 'widget_' . $id_base;
$widgets = get_option($widget_key);
$instance =& $widgets[$widget_nr];
// Get widget class
foreach ($GLOBALS['wp_widget_factory']->widgets as $widget_obj) {
if ($widget_obj->id_base == $id_base) {
break;
}
}
// Get response
if ('get' == $action) {
ob_start();
$widget_obj->form($instance);
return ob_get_clean();
}
if ('save' == $action) {
$new_instance = stripslashes_deep(reset($_POST['widget-' . $id_base]));
$instance = $widget_obj->update($new_instance, $instance);
update_option($widget_key, $widgets);
}
}
示例5: __construct
/**
* Constructor for the modal class.
*
* @param string $handle A slug-like definition of the modal.
* @param array $fields An array containing a default set of fields that belong to the modal.
* @param array $data An array containing the data for the fields that belong to the modal.
* @param array $config Optional configuration array.
* @since 0.1.0
*/
function __construct($handle, $fields = array(), $data = array(), $config = array())
{
$this->_data = stripslashes_deep($data);
$this->_config = wp_parse_args($config, array('title' => __('Edit', 'ev_framework'), 'title_controls' => '', 'button' => __('OK', 'ev_framework'), 'button_nonce' => wp_create_nonce("ev_modal_{$handle}"), 'footer_content' => ''));
$title = isset($this->_config['title']) ? $this->_config['title'] : '';
parent::__construct($handle, $title, $fields);
}
示例6: parse_gateway_notification
/**
* parse_gateway_notification method, receives data from the payment gateway
* @access private
*/
function parse_gateway_notification()
{
/// PayPal first expects the IPN variables to be returned to it within 30 seconds, so we do this first.
if ('sandbox' == get_option('paypal_certified_server_type')) {
$paypal_url = "https://www.sandbox.paypal.com/webscr";
} else {
$API_Endpoint = "https://api-3t.paypal.com/nvp";
$paypal_url = "https://www.paypal.com/cgi-bin/webscr";
}
$received_values = array();
$received_values['cmd'] = '_notify-validate';
$received_values += stripslashes_deep($_POST);
$options = array('timeout' => 20, 'body' => $received_values, 'httpversion' => '1.1', 'user-agent' => 'WP e-Commerce/' . WPSC_PRESENTABLE_VERSION);
$response = wp_remote_post($paypal_url, $options);
do_action('wpsc_paypal_express_ipn', $received_values, $this);
if ('VERIFIED' == $response['body']) {
$this->paypal_ipn_values = $received_values;
$this->session_id = $received_values['invoice'];
if (strtolower($received_values['payment_status']) == 'completed') {
$this->set_purchase_processed_by_sessionid(3);
transaction_results($this->session_id, false);
} elseif (strtolower($received_values['payment_status']) == 'denied') {
$this->set_purchase_processed_by_sessionid(6);
}
} else {
exit("IPN Request Failure");
}
}
示例7: _handleSubmittedData
protected function _handleSubmittedData()
{
if (!$this->_verifyFormSubmit()) {
return;
}
$_aDefaultOptions = $this->oProp->getDefaultOptions($this->oForm->aFields);
$_aOptions = $this->oUtil->addAndApplyFilter($this, "validation_saved_options_{$this->oProp->sClassName}", $this->oUtil->uniteArrays($this->oProp->aOptions, $_aDefaultOptions), $this);
$_aInput = $this->oUtil->getElementAsArray($_POST, $this->oProp->sOptionKey, array());
$_aInput = stripslashes_deep($_aInput);
$_aInputRaw = $_aInput;
$_sTabSlug = $this->oUtil->getElement($_POST, 'tab_slug', '');
$_sPageSlug = $this->oUtil->getElement($_POST, 'page_slug', '');
$_aInput = $this->oUtil->uniteArrays($_aInput, $this->oUtil->castArrayContents($_aInput, $this->_removePageElements($_aDefaultOptions, $_sPageSlug, $_sTabSlug)));
$_aSubmit = $this->oUtil->getElementAsArray($_POST, '__submit', array());
$_sSubmitSectionID = $this->_getPressedSubmitButtonData($_aSubmit, 'section_id');
$_sPressedFieldID = $this->_getPressedSubmitButtonData($_aSubmit, 'field_id');
$_sPressedInputID = $this->_getPressedSubmitButtonData($_aSubmit, 'input_id');
$this->_doActions_submit($_aInput, $_aOptions, $_sPageSlug, $_sTabSlug, $_sSubmitSectionID, $_sPressedFieldID, $_sPressedInputID);
$_aStatus = array('settings-updated' => true);
$_aInput = $this->_validateSubmittedData($_aInput, $_aInputRaw, $_aOptions, $_aStatus);
$_bUpdated = false;
if (!$this->oProp->_bDisableSavingOptions) {
$_bUpdated = $this->oProp->updateOption($_aInput);
}
$this->_doActions_submit_after($_aInput, $_aOptions, $_sPageSlug, $_sTabSlug, $_sSubmitSectionID, $_sPressedFieldID, $_bUpdated);
exit(wp_redirect($this->_getSettingUpdateURL($_aStatus, $_sPageSlug, $_sTabSlug)));
}
示例8: ssbl_settings
function ssbl_settings()
{
// check if user has the rights to manage options
if (!current_user_can('manage_options')) {
wp_die(__('You do not have sufficient permissions to access this page.'));
}
// if a post has been made
if (isset($_POST['ssblData'])) {
// get posted data
$ssblPost = $_POST['ssblData'];
parse_str($ssblPost, $ssblPost);
// if the nonce doesn't check out...
if (!isset($ssblPost['ssbl_save_nonce']) || !wp_verify_nonce($ssblPost['ssbl_save_nonce'], 'ssbl_save_settings')) {
die('There was no nonce provided, or the one provided did not verify.');
}
// prepare array to save
$arrOptions = array('pages' => isset($ssblPost['pages']) ? stripslashes_deep($ssblPost['pages']) : null, 'posts' => isset($ssblPost['posts']) ? stripslashes_deep($ssblPost['posts']) : null, 'share_text' => isset($ssblPost['share_text']) ? stripslashes_deep($ssblPost['share_text']) : null, 'image_set' => isset($ssblPost['image_set']) ? stripslashes_deep($ssblPost['image_set']) : null, 'selected_buttons' => isset($ssblPost['selected_buttons']) ? stripslashes_deep($ssblPost['selected_buttons']) : null);
// save the settings
ssbl_update_options($arrOptions);
return true;
}
// include required admin view
include_once SSBL_ROOT . '/system/views/ssbl_admin_panel.php';
// get ssbl settings
$ssbl_settings = get_ssbl_settings();
// --------- ADMIN PANEL ------------ //
ssbl_admin_panel($ssbl_settings);
}
示例9: jiathis_options
function jiathis_options()
{
$updated = false;
if ($_POST['jiathis_code'] != '') {
$jiathis_share_code = stripslashes_deep($_POST['jiathis_code']);
update_option('jiathis_code', $jiathis_share_code);
$share_pos = explode('|', $_POST['share_pos']);
$inpage = empty($_POST['inpage']) ? 'no' : $_POST['inpage'];
update_option('jiathis_pos', $share_pos[0]);
update_option('jiathis_dir', $share_pos[1]);
update_option('jiathis_feed', $inpage);
$updated = true;
}
$jiathis_code = get_option('jiathis_code');
echo '<div class="wrap">';
echo '<form name="jiathis_form" method="post" action="">';
echo '<p style="font-weight:bold;">jiaThis分享代码(请从<a href="http://www.jiathis.com/" target="_blank">JiaThis官网</a>获取):</p>';
echo '<p style="line-height:25px;"><span style="color:#000">JiaThis分享按钮主要分为:侧栏式、按钮式、工具式和图标式。默认嵌入的是"大图标"代码,显示在文章内容页的下面。<a href="http://www.jiathis.com/getcode/" target="_blank"><u>如果您想更换按钮风格,请点击这里到JiaThis官网获取新代码</u></a>。如果您需要对网站的分享数据进行追踪与分析,只需要到JiaThis<a href="http://www.jiathis.com/register" target="_blank"><u>免费注册</u></a>并重新获取代码嵌入这里即可。</span></p>';
if ($updated) {
echo '<div class="updated settings-error" id="setting-error-settings_updated"><p><strong>JiaThis分享代码已经成功保存。</strong></p></div>';
}
echo '<p><textarea style="height:250px;width:700px" name="jiathis_code">' . $jiathis_code . '</textarea></p>';
echo '<input type="checkbox" name="inpage" value="yes" ' . (get_option('jiathis_feed') == 'yes' ? 'checked="checked"' : '') . '/> 只在文章详细页面显示<br><br>';
echo '文章头部 : ';
echo '<input type="radio" name="share_pos" value="up|left" ' . (get_option('jiathis_dir') == 'left' && get_option('jiathis_pos') == 'up' ? 'checked="checked"' : '') . ' /> 居左 ';
echo '<input type="radio" name="share_pos" value="up|right" ' . (get_option('jiathis_dir') == 'right' && get_option('jiathis_pos') == 'up' ? 'checked="checked"' : '') . ' /> 居右 ';
echo '<br /><br />';
echo '文章尾部 : ';
echo '<input type="radio" name="share_pos" value="down|left" ' . (get_option('jiathis_dir') == 'left' && get_option('jiathis_pos') == 'down' ? 'checked="checked"' : '') . ' /> 居左 ';
echo '<input type="radio" name="share_pos" value="down|right" ' . (get_option('jiathis_dir') == 'right' && get_option('jiathis_pos') == 'down' ? 'checked="checked"' : '') . ' /> 居右 ';
echo '<p class="submit"><input type="submit" value="确认提交"/>';
echo '<input type="button" value="返回" onclick="window.location.href=\'plugins.php\';" /></p>';
echo '</form>';
echo '</div>';
}
示例10: do_execute
public function do_execute()
{
$variables = array();
// Handle updating of theme options.
if (isset($_POST[Ai1ec_View_Theme_Options::SUBMIT_ID])) {
$_POST = stripslashes_deep($_POST);
$lessphp = $this->_registry->get('less.lessphp');
$variables = $lessphp->get_saved_variables();
foreach ($variables as $variable_name => $variable_params) {
if (isset($_POST[$variable_name])) {
// Avoid problems for those who are foolish enough to leave php.ini
// settings at their defaults, which has magic quotes enabled.
if (get_magic_quotes_gpc()) {
$_POST[$variable_name] = stripslashes($_POST[$variable_name]);
}
if (Ai1ec_Less_Variable_Font::CUSTOM_FONT === $_POST[$variable_name]) {
$_POST[$variable_name] = $_POST[$variable_name . Ai1ec_Less_Variable_Font::CUSTOM_FONT_ID_SUFFIX];
}
// update the original array
$variables[$variable_name]['value'] = $_POST[$variable_name];
}
}
$_POST = add_magic_quotes($_POST);
} elseif (isset($_POST[Ai1ec_View_Theme_Options::RESET_ID])) {
$option = $this->_registry->get('model.option');
$option->delete('ai1ec_less_variables');
$option->delete('ai1ec_render_css');
do_action('ai1ec_reset_less_variables');
}
$css = $this->_registry->get('css.frontend');
$css->update_variables_and_compile_css($variables, isset($_POST[Ai1ec_View_Theme_Options::RESET_ID]));
return array('url' => ai1ec_admin_url('edit.php?post_type=ai1ec_event&page=all-in-one-event-calendar-edit-css'), 'query_args' => array());
}
示例11: init
function init()
{
if (current_user_can('administrator')) {
$this->post = stripslashes_deep($_POST);
$this->register_ajax('red_log_show');
$this->register_ajax('red_log_hide');
$this->register_ajax('red_log_delete');
$this->register_ajax('red_module_edit');
$this->register_ajax('red_module_load');
$this->register_ajax('red_module_save');
$this->register_ajax('red_module_reset');
$this->register_ajax('red_module_delete');
$this->register_ajax('red_group_edit');
$this->register_ajax('red_group_load');
$this->register_ajax('red_group_save');
$this->register_ajax('red_group_toggle');
$this->register_ajax('red_group_delete');
$this->register_ajax('red_group_reset');
$this->register_ajax('red_group_move');
$this->register_ajax('red_group_saveorder');
$this->register_ajax('red_redirect_edit');
$this->register_ajax('red_redirect_load');
$this->register_ajax('red_redirect_save');
$this->register_ajax('red_redirect_toggle');
$this->register_ajax('red_redirect_delete');
$this->register_ajax('red_redirect_reset');
$this->register_ajax('red_redirect_move');
$this->register_ajax('red_redirect_saveorder');
$this->register_ajax('red_redirect_add');
}
}
示例12: renderFields
/**
* Build edit form fields.
*
* @since 4.4
*/
public function renderFields()
{
if (!vc_verify_admin_nonce() || !current_user_can('edit_posts') && !current_user_can('edit_pages')) {
wp_send_json(array('success' => false));
}
function array_htmlspecialchars_decode(&$input)
{
if (is_array($input)) {
foreach ($input as $key => $value) {
if (is_array($value)) {
$input[$key] = array_htmlspecialchars_decode($value);
} else {
$input[$key] = htmlspecialchars_decode($value);
}
}
return $input;
}
return htmlspecialchars_decode($input);
}
$params = array_map('array_htmlspecialchars_decode', (array) stripslashes_deep(vc_post_param('params')));
$tag = stripslashes(vc_post_param('tag'));
require_once vc_path_dir('EDITORS_DIR', 'class-vc-edit-form-fields.php');
$fields = new Vc_Edit_Form_Fields($tag, $params);
$fields->render();
die;
}
示例13: geodir_register_post_types
/**
* Register the post types.
*
* @since 1.0.0
*
* @global array $wp_post_types List of post types.
*/
function geodir_register_post_types()
{
global $wp_post_types;
$post_types = array();
$post_types = get_option('geodir_post_types');
// Register each post type if array of data is returned
if (is_array($post_types)) {
foreach ($post_types as $post_type => $args) {
if ($post_type == 'gd_place' && get_option('geodir_disable_place_tax')) {
continue;
}
if (!empty($args['rewrite']['slug'])) {
$args['rewrite']['slug'] = _x($args['rewrite']['slug'], 'URL slug', GEODIRECTORY_TEXTDOMAIN);
}
$args = stripslashes_deep($args);
if (!empty($args['labels'])) {
foreach ($args['labels'] as $key => $val) {
$args['labels'][$key] = __($val, GEODIRECTORY_TEXTDOMAIN);
// allow translation
}
}
/**
* Filter post type args.
*
* @since 1.0.0
* @param string $args Post type args.
* @param string $post_type The post type.
*/
$args = apply_filters('geodir_post_type_args', $args, $post_type);
$post_type = register_post_type($post_type, $args);
}
}
}
示例14: options
/**
* Show opt out options page
*
*/
public function options()
{
global $wpdb;
$errors = array();
$success = false;
$opt_out_level = get_option("bbpp_thankmelater_opt_out_level", "disabled");
$opt_out_form_type = get_option("bbpp_thankmelater_opt_out_form_type", "out");
$opt_out_form_out_text = get_option("bbpp_thankmelater_opt_out_form_out_text", "1");
$opt_out_form_out_text_custom = get_option("bbpp_thankmelater_opt_out_form_out_text_custom", "");
$opt_out_form_in_text = get_option("bbpp_thankmelater_opt_out_form_in_text", "1");
$opt_out_form_in_text_custom = get_option("bbpp_thankmelater_opt_out_form_in_text_custom", "");
if ($_POST) {
check_admin_referer("bbpp_thankmelater_opt_out_options");
$data = stripslashes_deep($_POST);
$opt_out_level = isset($data["bbpp_thankmelater_opt_out_level"]) ? $data["bbpp_thankmelater_opt_out_level"] : NULL;
$opt_out_form_type = isset($data["bbpp_thankmelater_opt_out_form_type"]) ? $data["bbpp_thankmelater_opt_out_form_type"] : NULL;
$opt_out_form_out_text = isset($data["bbpp_thankmelater_opt_out_form_out_text"]) ? $data["bbpp_thankmelater_opt_out_form_out_text"] : NULL;
$opt_out_form_out_text_custom = isset($data["bbpp_thankmelater_opt_out_form_out_text_custom"]) ? $data["bbpp_thankmelater_opt_out_form_out_text_custom"] : NULL;
$opt_out_form_in_text = isset($data["bbpp_thankmelater_opt_out_form_in_text"]) ? $data["bbpp_thankmelater_opt_out_form_in_text"] : NULL;
$opt_out_form_in_text_custom = isset($data["bbpp_thankmelater_opt_out_form_in_text_custom"]) ? $data["bbpp_thankmelater_opt_out_form_in_text_custom"] : NULL;
$error = new WP_Error();
if (!in_array($opt_out_level, array("disabled", "email", "form"))) {
$error->add("opt_out_level", __("You must select an option.", "bbpp-thankmelater"));
}
if ($opt_out_level == "form") {
if (!in_array($opt_out_form_type, array("out", "in"))) {
$error->add("opt_out_form_type", __("You must select an option.", "bbpp-thankmelater"));
}
if ($opt_out_form_type == "out") {
if (!in_array($opt_out_form_out_text, array("1", "custom"))) {
$error->add("opt_out_form_out_text", __("You must select an option.", "bbpp-thankmelater"));
}
if ($opt_out_form_out_text == "custom" && empty($opt_out_form_out_text_custom)) {
$error->add("opt_out_form_out_text", __("This must not be blank.", "bbpp-thankmelater"));
}
} elseif ($opt_out_form_type == "in") {
if (!in_array($opt_out_form_in_text, array("1", "custom"))) {
$error->add("opt_out_form_in_text", __("You must select an option.", "bbpp-thankmelater"));
}
if ($opt_out_form_in_text == "custom" && empty($opt_out_form_in_text_custom)) {
$error->add("opt_out_form_in_text", __("This must not be blank.", "bbpp-thankmelater"));
}
}
}
if ($error->get_error_codes()) {
$errors[] = $error;
} else {
update_option("bbpp_thankmelater_opt_out_level", $opt_out_level);
update_option("bbpp_thankmelater_opt_out_form_type", $opt_out_form_type);
update_option("bbpp_thankmelater_opt_out_form_out_text", $opt_out_form_out_text);
update_option("bbpp_thankmelater_opt_out_form_out_text_custom", $opt_out_form_out_text_custom);
update_option("bbpp_thankmelater_opt_out_form_in_text", $opt_out_form_in_text);
update_option("bbpp_thankmelater_opt_out_form_in_text_custom", $opt_out_form_in_text_custom);
$success = true;
}
}
// get a list of the most recent opt outs
$opt_out_results = $wpdb->get_results("\r\n\t\t\tSELECT `email`, `date_gmt`\r\n\t\t\tFROM `{$wpdb->prefix}bbpp_thankmelater_opt_outs`\r\n\t\t\tORDER BY `date_gmt` DESC\r\n\t\t\tLIMIT 100\r\n\t\t");
require_once BBPP_THANKMELATER_PLUGIN_PATH . "admin/opt-out/options.php";
}
示例15: _init
/**
* 启动
*
* @author mrmsl <msl-138@163.com>
* @date 2012-12-25 10:05:23
* @lastmodify 2013-01-21 15:25:25 by mrmsl
*
* @return void 无返回值
*/
private function _init()
{
set_error_handler('error_handler');
set_exception_handler('exception_handler');
register_shutdown_function('fatal_error');
//spl_autoload_register('autoload');
ob_get_level() != 0 && ob_end_clean();
if (IS_LOCAL && APP_DEBUG) {
//本地开发环境
error_reporting(E_ALL | E_STRICT);
//错误报告
ini_set('display_errors', 1);
//显示错误
} else {
ini_set('display_errors', 0);
}
if (get_magic_quotes_gpc()) {
!empty($_GET) && ($_GET = stripslashes_deep($_GET));
!empty($_POST) && ($_POST = stripslashes_deep($_POST));
!empty($_COOKIE) && ($_COOKIE = stripslashes_deep($_COOKIE));
}
date_default_timezone_set(sys_config('sys_timezone_default_timezone', '', DEFAULT_TIMEZONE));
//设置系统时区
define('APP_NOW_TIME', time());
//当前时间戳
$this->_initLangTheme();
//语言包及皮肤
$this->_initSession();
//session
C(include INCLUDE_PATH . 'config.inc.php');
//配置
}