3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php require_once "src/init.php"; include('src/connect.php'); $user = new User(); if ($user->isLoggedIn()) { $u = $user->getData(); } // new data $id = $_POST['memids']; $truck_no = $_POST['truck_no']; $vin = $_POST['vin']; $plate = $_POST['plate']; $trk_status = $_POST['status']; // query $sql = "UPDATE truck SET truck_no=?, vin=?, plate=?, trk_status=?, user_id=? WHERE id=?"; $q = $db->prepare($sql); $q->execute(array($truck_no,$vin,$plate,$trk_status,$u->username,$id)); header("Location: truck.php"); exit; ?>
based on 5Wvgj
Output for 7.1.25 - 7.3.2
Warning: require_once(): open_basedir restriction in effect. File(src/init.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/1Z5V7 on line 2 Warning: require_once(src/init.php): failed to open stream: Operation not permitted in /in/1Z5V7 on line 2 Fatal error: require_once(): Failed opening required 'src/init.php' (include_path='.:') in /in/1Z5V7 on line 2
Process exited with code 255.