I want to check availability of the files in the FTP server. If not exit then an automation mail will be sent. This code is working fine for an exact file name to be give in the variable, but I want to use (%
) to show as this :
$filename = 'temp%'
, to match only the first part of the file name before percentage. How to use this in PHP?
// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
$filename = 'temp%';
// try to check if files exist
if (!file_exists($filename)) {
//Sending Email
$htmlbody ="
<head>
...";
// ...
}