From 62c38c13a1132f1015025f15b568ae839cc13bde Mon Sep 17 00:00:00 2001 From: nathaniacalista01 <nathania.calista01@gmail.com> Date: Fri, 17 Nov 2023 04:45:40 +0700 Subject: [PATCH] fix : source --- app/views/premium/detailModule.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/premium/detailModule.php b/app/views/premium/detailModule.php index 0f650cb..9c8fdd5 100644 --- a/app/views/premium/detailModule.php +++ b/app/views/premium/detailModule.php @@ -66,7 +66,9 @@ <?php $materials = $data["materials"]; + foreach ($materials as $material) { + $path = "http://localhost:8000/".$material["material_path"] ; echo" <div class='accordion'> <div class='accordion-content' style='display: flex; justify-content: space-between;'> @@ -82,7 +84,7 @@ <span>$material[description]<span> <br> <br> - <object data='$material[material_path]' type='application/pdf' width='100%' height='800'> + <object data='$path' type='application/pdf' width='100%' height='800'> <p>It appears your web browser doesn't support embedding PDFs.</p> </object> </div> @@ -95,7 +97,7 @@ <br> <br> <video width='100%' height=auto controls> - <source src=<?php echo $material["material_path"]?> type='video/mp4'> + <source src=<?php echo $path?> type='video/mp4'> Your browser does not support the video tag. </video> </div> -- GitLab