PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
//////////////////////////////////////////////////////////////////////////////////
// Name : uploadFile
// Type : code
// info : string uploadFile(string $fileFieldName,string $directory)
// Description :
// Gets the file name then uploads the file into the spesified
// Directory
// parsiTech web Development Department
//////////////////////////////////////////////////////////////////////////////////
function uploadFile($fileFieldName,$directory)
{
$photoName = $_FILES[$fileFieldName]['name'];
$photoName = str_replace(' ','_',$photoName);
move_uploaded_file($_FILES[$fileFieldName]['tmp_name'],$directory.$photoName);
return $photoName;
} // uploadFile
it works properly and the file uploads no error occured but the files and the images i upload via this function be came unread able and only php can delete or modify them i even can not copy the to another directory
Pease help me what should i do
no no i meant that
1.php has successfuly uploaaded that file
2.the image is being shown successfuly in the pages
3.when i try to delete the uploaded files on my pc using win/linux it s imposible
4.i should only delete the files using the php
5.i want to delete my files or move them when ever i want