0

hi guys!

this is my problem, let's say the user wants to edit the file's information, not the file itself. example, i have Document1.doc, that is my file, what i want is that the user could edit the information, let's say the time it was uploaded, the filename and not necessarily the content of the file itself.

thanks in advance...

3
Contributors
6
Replies
11
Views
8 Years
Discussion Span
Last Post by xuexue
0

are you inserting file into database?
with database its easy insert file path into one field,file name into one field and time into 1 field
then in edit you can just update name and time fields

0

sir i can do that, it is easy to edit that in the database, however the problem is that how about the file itself? i mean its filename like that that is stored in the uploads folder????

0

sir it's not working, the files i wanted to replace is located in a separate folder, uploads folder.

this is the error:

Warning: rename(logo.psd,golo.psd) [function.rename]: No such file or directory in C:\server\htdocs\samples\php\fileRecs.php on line 332
0

sir can you check this out...

function GetFileDir($php_self)
{ 
$filename = explode("/", $php_self); 
for( $i = 0; $i < (count($filename) - 1); ++$i ) 
{ 
	$filename2 .= $filename[$i].'/'; 
} 
	return $filename2; 
}

this outputs: this is the output

(/samples/php/uploads/logo.psd
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.