3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); include("inc/include.php"); if(!isset($_SESSION['sess_id'])) { header("Location: index"); exit; } $query = $config['mysql_connection']->prepare("SELECT SUM(`uSize`) FROM `uploads` WHERE `uUser` = ? AND `uRemoved` = 0"); $query->execute(array($_SESSION['sess_id'])); $used = $query->fetchColumn(); ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="shortcut icon" href="<?php echo $config['favicon']; ?>"> <title><?php echo $config['name']; ?></title> <!-- Bootstrap --> <link href="<?php echo $config['style'][0]; ?>" rel="stylesheet"> <link href="<?php echo $config['fa']; ?>" rel="stylesheet"> <link href="<?php echo $config['social']; ?>" rel="stylesheet"> <link href="css/quacco.css" rel="stylesheet"> <link href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/jquery.dataTables.css" rel="stylesheet"> <style> #dropbox { height: 116px; text-align: center; padding-top: 47px; font-weight: bold; letter-spacing: 1px; } .db-active { background: #dd4814; color: #ffffff; box-shadow: 0px 0px 5px 6px #cccccc; } .preview { border: 1px solid #CDCDCD; width: 450px; padding: 10px; height:auto; overflow: auto; color: #4D4D4D; float: left; box-shadow:3px 3px 3px #888888; border-radius: 2px; } .preview-image { box-shadow: 3px 3px 3px #888888; width: 70px; height: 70px; float: left; margin-right: 10px; } .file-info { height: 50px; float: left; width: auto; margin-bottom: 10px; border: 1px solid blue; } .file-info span { margin: 3px 2px; font-size: 12px; float:left; display: block; min-width: 100px; overflow: auto; border: 1px solid red; overflow: none; } .progress { margin-bottom: 3px; } </style> </head> <body> <div id="wrapper"> <nav class="navbar navbar-default navbar-fixed-top" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav"> <li class="naaaav"><a href="dashboard" id="dashboard"><i class="fa fa-tachometer fa-fw fa-2x"></i><br />Dashboard</a></li> <li class="naaaav"><a href="insights"><i class="fa fa-bar-chart-o fa-fw fa-2x"></i><br />Insights</a></li> <li class="dropdown active"> <a href="#" class="dropdown-toggle naaaav" data-toggle="dropdown"><i class="fa fa-wrench fa-fw fa-2x"></i><br />Tools <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="files">Files</a></li> <li><a href="compose">Compose</a></li> <li><a href="shorten">Bit.ly</a></li> <li><a href="cloud">Tag cloud</a></li> </ul> </li> </ul> <ul class="nav navbar-nav navbar-right"> <li class="dropdown"> <a href="#" class="dropdown-toggle naaaav" data-toggle="dropdown"><i class="fa fa-user fa-fw fa-2x"></i><br /><b class="caret"></b></a> <ul class="dropdown-menu"> <li class="dropdown-header">You</li> <li><a href="profile">Profile</a></li> <li><a href="add_service">Add services</a></li> <li><a href="settings">Settings</a></li> <li class="divider"></li> <li><a href="pricing">Pricing & plans</a></li> <li class="divider"></li> <li><a href="help">Need help?</a></li> <li><a href="privacy">Privacy</a></li> <li><a href="developers">Developers</a></li> <li class="divider"></li> <li><a href="logout">Logout</a></li> </ul> </li> </ul> </div> </div> </nav> <div id="page-wrapper"> <div class="row"> <div class="col-xs-12"> <h1 class="page-header">Your uploaded files<?php echo "<small id='used'> - " . round(($used/$_SESSION['sess_database']['uStorage'])*100, 0) . "% of " . formatSizeUnits($_SESSION['sess_database']['uStorage']) . " used</small>"; ?></h1> </div> </div> <div class="row"> <div class="col-xs-8"> <div class="panel panel-default"> <div class="panel-heading"><i class="fa fa-list fa-fw"></i> Uploaded files</div> <div class="panel-body"> <div class="table-responsive"> <table class="table table-striped table-bordered table-hover" id="table"> <thead> <tr> <th></th> <th>Name</th> <th>Size</th> <th>Format</th> <th class="text-right">Uploaded</th> <th></th> </tr> </thead> <tbody id="all-files"></tbody> </table> </div> </div> </div> </div> <div class="col-xs-4"> <div class="row"> <div class="col-xs-12"> <div class="panel panel-default"> <div class="panel-heading"><i class="fa fa-upload fa-fw"></i> Upload files</div> <div class="panel-body"> <?php if($used > $_SESSION['sess_database']['uStorage']) echo '<p class="text-danger">Please upgrade to <strong>Premium</strong> if you wish to upload more than 50 MB!</p>'; ?> <input type="file" id="upload" multiple accept="image/*|audio/*" onchange="handleFiles(this.files)" /> <span>Browse and select OR drop files below</span> <div id="dropbox" class="well">Drag and drop files here</div> </div> </div> </div> </div>
Output for 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Warning: include(): open_basedir restriction in effect. File(inc/include.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/3Kbjh on line 3 Warning: include(inc/include.php): Failed to open stream: Operation not permitted in /in/3Kbjh on line 3 Warning: include(): Failed opening 'inc/include.php' for inclusion (include_path='.:') in /in/3Kbjh on line 3 Warning: Cannot modify header information - headers already sent by (output started at /in/3Kbjh:3) in /in/3Kbjh on line 7
Output for 8.0.13
Warning: include(inc/include.php): Failed to open stream: No such file or directory in /in/3Kbjh on line 3 Warning: include(): Failed opening 'inc/include.php' for inclusion (include_path='.:') in /in/3Kbjh on line 3 Warning: Cannot modify header information - headers already sent by (output started at /in/3Kbjh:3) in /in/3Kbjh on line 7
Output for 5.2.3 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.7, 7.3.32 - 7.3.33, 7.4.33
Warning: include(inc/include.php): failed to open stream: No such file or directory in /in/3Kbjh on line 3 Warning: include(): Failed opening 'inc/include.php' for inclusion (include_path='.:') in /in/3Kbjh on line 3 Warning: Cannot modify header information - headers already sent by (output started at /in/3Kbjh:3) in /in/3Kbjh on line 7
Output for 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.32
Warning: include(): open_basedir restriction in effect. File(inc/include.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/3Kbjh on line 3 Warning: include(inc/include.php): failed to open stream: Operation not permitted in /in/3Kbjh on line 3 Warning: include(): Failed opening 'inc/include.php' for inclusion (include_path='.:') in /in/3Kbjh on line 3 Warning: Cannot modify header information - headers already sent by (output started at /in/3Kbjh:3) in /in/3Kbjh on line 7
Output for 5.1.0 - 5.1.6, 5.2.0 - 5.2.2
Warning: session_start(): Cannot send session cookie - headers already sent in /in/3Kbjh on line 2 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/3Kbjh:2) in /in/3Kbjh on line 2 Warning: include(inc/include.php): failed to open stream: No such file or directory in /in/3Kbjh on line 3 Warning: include(): Failed opening 'inc/include.php' for inclusion (include_path='.:') in /in/3Kbjh on line 3
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5
Warning: session_start(): Cannot send session cookie - headers already sent in /in/3Kbjh on line 2 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/3Kbjh:2) in /in/3Kbjh on line 2 Warning: main(inc/include.php): failed to open stream: No such file or directory in /in/3Kbjh on line 3 Warning: main(): Failed opening 'inc/include.php' for inclusion (include_path='.:') in /in/3Kbjh on line 3
Output for 4.3.0 - 4.3.1
Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cookie - headers already sent in /in/3Kbjh on line 2 Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cache limiter - headers already sent (output started at /in/3Kbjh:2) in /in/3Kbjh on line 2 Warning: main(inc/include.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/3Kbjh on line 3 Warning: main() [http://www.php.net/function.main]: Failed opening 'inc/include.php' for inclusion (include_path='.:') in /in/3Kbjh on line 3

preferences:
234.36 ms | 402 KiB | 328 Q