How can I use scandir with an URL. Now it looks like PHP doesn't see the URL as an URL. Is there a way to use an URL in scandir?
<form action="new_exercise.php?id=<?php echo $new_id; ?>" method="post">
<input class="" type="text" name="name_exe" required placeholder="Project naam">
<select name="audio" required>
<option></option>
<?php
$path = 'URL comes here';
$results = scandir($path);
foreach ($results as $result) {
if ($result === '.' or $result === '..') continue;
if (is_dir($path . '/' . $result)) {
echo "<option>" . $result . "</option>";
}
}
?>
<select>
<input class="btn-success" type="submit" name="submit" value="Maak nieuwe opdracht">
</form>