/** * @param mixed $data * @param string|int $mode * 1: [-012]: (def: 0), -0: ::dump(), 1: var_dump(), 2: print_r() * 2: [01] : (def: 0), 0: pre, 1: nopre * @param int $maxDepth * @param bool $return - def: false, czy ma zwrócić wynik zamiast wyprintować na ekran * * @return string */ function niechginie($data, $mode = null, $maxDepth = 2, $return = false, $force = false) { nieginie($data, $mode, $maxDepth, $return, false, debug_backtrace()); $force || isdebug() and die; }
<?php //use Symfony\Component\HttpFoundation\Request; use Stopsopa\UtilsBundle\Lib\Request; use Symfony\Component\Debug\Debug; require_once __DIR__ . '/../app/CommonTools.php'; // If you don't want to setup permissions the proper way, just uncomment the following PHP line // read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information //umask(0000); // This check prevents access to debug front controllers that are deployed by accident to production servers. // Feel free to remove this, extend it, or make something more sophisticated. if (isset($_SERVER['HTTP_CLIENT_IP']) || isset($_SERVER['HTTP_X_FORWARDED_FOR']) || !(in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1')) || php_sapi_name() === 'cli-server')) { header('HTTP/1.0 403 Forbidden'); exit('You are not allowed to access this file. Check ' . basename(__FILE__) . ' for more information.'); } $loader = (require_once __DIR__ . '/../app/bootstrap.php.cache'); Debug::enable(); require_once __DIR__ . '/../app/AppKernel.php'; if (isdebug(true) == 'dev') { $kernel = new AppKernel('dev', true); } elseif (isdebug(true) == 'prod') { $kernel = new AppKernel('prod', false); } else { $kernel = new AppKernel('prod', false); } $kernel->loadClassCache(); $request = Request::createFromGlobals(); $response = $kernel->handle($request); $response->send(); $kernel->terminate($request, $response);
var pid = $("#university").val(); var array = get_college(pid); $('#college').html("<option value='0'>--请选择--</option>"); $('#major').html("<option value='0'>--请选择--</option>"); for(var id in array) { if(pid == array[id].pid) { $("#college").append("<option value='"+id+"'>"+array[id].title+"</option>"); //添加一项option } } } catch(e) { <?php if (isdebug()) { ?> alert($); alert("university_change catch" + e.name + " : " + e.message); <?php } ?> } } function college_change() { try { var pid = $("#college").val();