At 21:22 24/10/2002 -0700, echa cheren wrote:
saya mo nanya nih.
bagaimana cara upload files(file text) ke direktori
tertentu tapi link files tersebut masuk kedalam
database
Upload nya pasti pakai script kan ... php/perl/etc
Nah pas upload itu tambahin aja command buat insert ke database data nama file yg diupload tsb.
insert into uploadedFile (FileName) values ($pathToFile)

bagaimana cara buka file yang sudah diupload tadi agar
bisa diedit dalam <textarea>
Contoh pakai php :

echo "<textarea name='FileContent'>";
if (file_exists($fullPathToFile) && ! $FileContent) { //do not overwrite user-submitted text
// read from file
$fd = fopen ($fullPathToFile, "r");
while (!feof($fd)) {
$buffer = fgets($fd, 4096);
echo $buffer;
}
} else {
// display user-submitted text
echo $FileContent;
}
echo "</textarea>";



Best Regards,
Ferry I



--
Utk berhenti langganan, kirim email ke [EMAIL PROTECTED]
Informasi arsip di http://www.linux.or.id/milis.php3



Kirim email ke