Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
- if ( !function_exists('jsredirect') )
- {
- function jsredirect($url, $top = false)
- {
- $script_redirect = '<script type="text/javascript">';
- $script_redirect .= 'window';
- if( $top ) $script_redirect .= '.top';
- $script_redirect .= '.location.href="'.$url.'"';
- $script_redirect .= '</script>';
- echo $script_redirect;
- die();
- }
- }
- if ( !function_exists('arr2json') )
- {
- function arr2json($arr, $echo = true)
- {
- if( $echo )
- {
- header('Content-type: application/json');
- echo json_encode($arr);
- }
- else
- {
- return json_encode($arr);
- }
- }
- }
- if ( !function_exists('pr') )
- {
- function pr($arr)
- {
- echo '<PRE>';
- print_r($arr);
- echo '</PRE>';
- }
- }
- if ( !function_exists('pd') )
- {
- function pd($arr)
- {
- echo '<PRE>';
- var_dump($arr);
- echo '</PRE>';
- }
- }
- if ( !function_exists('prd') )
- {
- function prd($arr)
- {
- echo '<PRE>';
- print_r($arr);
- echo '</PRE>';
- die();
- }
- }
- if ( !function_exists('dd') )
- {
- function dd($arr)
- {
- echo '<PRE>';
- var_dump($arr);
- echo '</PRE>';
- die();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement