View Single Post
Old 25-03-2009, 13:26   #5
funkyCable
Inactive
 
Join Date: Aug 2005
Location: Canvey Island, Essex
Services: SERVICES FROM 26/08/05 TV XL services 2MB BROADBRAND UNLIMITED TALK PACKAGE V+ Service (Since 18
Posts: 1,195
funkyCable is just really nicefunkyCable is just really nicefunkyCable is just really nicefunkyCable is just really nicefunkyCable is just really nicefunkyCable is just really nice
Re: need help with pointing to an ubuntu directory. Using LAMPP

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($dir1);
?>
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
funkyCable is offline   Reply With Quote