- file_get_contents: documentation ( source)
<?php
$path = $_GET['path'];
if(!isset($path)){
echo file_get_contents('index.html');
die();
}
require 'work-data.php';
$size = count($portfolio);
for($portfolioIndex = 0 ; $portfolioIndex < $size ; $portfolioIndex++){
if($path === $portfolio[$portfolioIndex].path){
$record = $portfolio[$portfolioIndex];
}
}
echo file_get_contents('index.html');
?>