this is a test code i wrote to get a value set for $rectype to insert into a table. problem I'm having is $rectype is returning 0 or empty. the files do exist since I perform a similar is_file check to start the process that leads up to this section of the coding
$dirchk1 = "/temp/files/" . $data[0] . ".doc"; // exist
$dirchk2 = "/temp/files/" . $data[1] . ".doc"; // exist
$file_1 = (is_file($dirchk1));
$file_2 = (is_file($dirchk2));
if ($file_1) {
$rectype == ($file_2 ? '3' : '1');
}
echo $rectype . "\n";