Forum Moderators: coopster
Is it possible to do the following with php?
1. display a form which includes a <textarea>
2. press a button on the form that would display a directory dialog box which would allow the user to navigate their local directories and select a word document
3. the contents of the selected word document would be sucked into the text area which - on submit - would then be inserted into a database on the web server.
I've looked at the fopen() function, but that won't open up a directory dialog. I've also read elsewhere that the file chosen needs to be uploaded to the server before it can be displayed in the textarea.
Any guidance greatly appreciated.
Neophyte
further
MS word is adding a ton of codes that needs to be cleaned
look at any WYSIWYG to find how the MS mess is cleaned before insertion
Here we open a dir find a file and copy it to another destination
$source="/pub/comwww/****x.php";
$dest="/pub/comwww/****x.php";
if (!copy($source, $dest)) {
print ("failed to copy $dest...\n");
}
echo "";
// end of copy file