What if a picture has been removed or the link in the table is old as the file has been moved to another location?
Do you know if you can create sceduled jobs in mysql like you do with ORACLE?
So I should perhaps have a temp directory that I use to pick up the files/directories
create a reference and store it in the table and once this is done successfully move it to the relivant permanent folder where the image will reside.
---------- Post added at 14:26 ---------- Previous post was at 14:22 ----------
I'm trying to determine whether the path is part of a directory or a file.
PHP Code:
<?php
$dir = '/opt/lampp';
$files1 = scandir($dir);
$files2 = scandir($dir, 1);
?>
Directory <br />
<?php
foreach ($files1 as $fileobject){
if (is_dir($fileobject)){
echo "$fileobject<br>";
}
}
?>
Files:<br />
<?php
foreach ($files1 as $fileobject){
if (is_dir($fileobject)==FALSE){
echo "$fileobject<br>";
}
}
?>
Under the directory I get "." and ".." and under files I get all the files and directories. I tried the is_file() function and that did not help neither