我想支票夾,如果它包含PDF就會去其他的過程中,如果不包含PDF,它會跳過過程。 下面的代碼:檢查文件,如果不包含PDF它會跳過下一道工序
<?php
set_time_limit(0);
$savePath = 'D:/AppServ/www/aca/';
$dir = opendir($savePath);
$check = glob($savePath.'*.pdf');
if($check === ''){ exit();} // if not found pdf don't do process below this
// many other process below
?>
但過程中仍然運行,如何突破呢?謝謝:)
請記住,使用「文件擴展名」,以確定文件的類型是非常80ish ... – arkascha