File Test - Blythe Bridge High School & Sixth Form
474
page-template,page-template-page-portfolio,page-template-page-portfolio-php,page,page-id-474,bridge-core-1.0.6,ajax_fade,page_not_loaded,,qode_grid_1200,qode-child-theme-ver-1.0.0,qode-theme-ver-18.2,qode-theme-bridge,wpb-js-composer js-comp-ver-6.0.5,vc_responsive
 

File Test

[insert_php]

$dir = ‘/var/www/pdf/externalFiles/Codsall/Jobs’;
//$pdfArray =

$cleanDir = array_diff(scandir($dir), array(‘..’, ‘.’));

foreach($cleanDir as $folder){

echo “

” . $folder . “

“;

$fileArray = glob($dir . “/” . $folder . “/*”);

foreach($fileArray as $file){

if(substr($file, strrpos($file, ‘.’) + 1) ==”txt”){

$txtDoc = $file;
}

if(substr($file, strrpos($file, ‘.’) + 1) ==”pdf”){
$pdfFile[] = $file;

}

}
//$txtDocr = str_replace(“£”,”£”,file_get_contents($txtDoc, true));

$txtDocr = str_replace(chr(163),”£”,file_get_contents($txtDoc, true));

echo nl2br($txtDocr, true) . “

“;
echo “

“;
unset($pdfFile);
}

[/insert_php]