01242007 1517 GMT-6

$dirName = "wallpaper/";
$dir = opendir($dirName); 

This was a desktop program I just created.
The $dirName name holds the name of the folder with pictures in it.
The $dir holds the path to the directory.

while ($file_name = readdir($dir)){    
                        if (($file_name != ".") && ($file_name != "..")){
                                if (eregi("~", $file_name)) {    
                                } else { 
                                        if (eregi(".jpg", $file_name) || 
eregi(".gif", $file_name) ||
eregi(".png", $file_name)) { 
                                                $ImageData = 
getimagesize($dirName.$file_name);
                                                $DisplayImages[] = array("name" 
=> $file_name, "width" =>
$ImageData[0], "height" => $ImageData[1]);
                                        }
                                }

                        }    
                } 

All this does is, makes sure that the folders is a folder, grabs only
images, and puts them in an array.

Total path = $dirName.$DisplayImages[$Display]['name'];

wade



On Wed, 2007-01-24 at 15:02 -0600, Brian E Boothe wrote:
> can someone Please / Show me how to Save a filepath in an Access or 
> MySQL database,
>   Lets say u have an upload field and all i wanna save is the path to 
> that file  and the file name
>       not the actual File  to a database table,
> 
> 
> Community email addresses:
>   Post message: [email protected]
>   Subscribe:    [EMAIL PROTECTED]
>   Unsubscribe:  [EMAIL PROTECTED]
>   List owner:   [EMAIL PROTECTED]
> 
> Shortcut URL to this page:
>   http://groups.yahoo.com/group/php-list 
> Yahoo! Groups Links
> 
> 
> 
> 

Reply via email to