PHP Upload into Folder on Server

Hello all !

I upload a picture from my computer to the website (upload script)

The picture shows up on the webpage gallery (JS Gallery) ! The gallery is instructed to dir all the files in the specific folder and show them.

But when i connect with my FTP client i cant find the pics in just that specific folder, they are simply gone but still they exist in the webpage.

My own conclusion is that my files saves as TEMP files in some odd directory but what i cant understad is that my files is displayed on the webpage

The site is in swedish and is a Protfolio type of page.

www.hundfotografen.com

I am open to any other suggestion =)

The upload script (form not included)
[php]

<?php $uploaddir = '.'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); echo "

"; if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\n"; } else { echo "Upload failed"; } echo "

"; echo '
';
echo 'Here is some more debugging info:';
print_r($_FILES);
print "
"; ?>

[/php]

The delete/array site
[php]

<?php $path = "."; if(isset($_POST['file']) && is_array($_POST['file'])) { foreach($_POST['file'] as $file) { unlink($path . "/" . $file) or die("Failed to delete file"); } } ?> <?php $path = "."; $dir_handle = @opendir($path) or die("Unable to open folder");

while (false !== ($file = readdir($dir_handle))) {

if($file == “index.php”)
continue;
if($file == “delete.php”)
continue;
if($file == “add.php”)
continue;
if($file == “array.php”)
continue;
if($file == “tmp”)
continue;
if($file == “.”)
continue;
if($file == “…”)
continue;

echo “

”;
echo “”;
echo “”;
echo “”;
echo “”;
}

closedir($dir_handle);

?>
[/php]

The Images is stored in the same location as the scripts are .

Bild Ta Bort Bild Bekräfta
$fileMarkera

$file
Sponsor our Newsletter | Privacy Policy | Terms of Service