Jump to content

File Uploaded from .doc to .html


chuckdraws

Recommended Posts

Hello, I was wondering where I'd start at (noob at PHP) to get a file uploading .php script.

 

What I want in it is for the person uploading to select a date from a drop-down menu.

 

Then the file uploaded will be in .doc format, and we need to strip the contents of this (preferrably formatted) and put it into a certain section of an html file.  In other words, I need to replace the content area of an html file with the contents of the doc file.  The date selection is so we know what file to change the contents of (e.g. Monday, September 28th 2009 will replace monday.html, and so on).

 

I'm great at html coding and css and everything design-wise, but I need help when it comes to server-scripting.

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/175937-file-uploaded-from-doc-to-html/
Share on other sites

There is a section in the manual that covers this nicely: PHP: Handling file uploads

 

As far as modifying your html files, you could use the following functions:

 

You'll need to use a Regular Expression with preg_replace, regular-expressions.info is a great resource for this. Although, I would suggest you look into how you could achieve the desired result with the use of a database, rather than updating your HTML files.

Thanks for the info, it really helps a lot.  I knew about file_get_contents(), but wasn't sure about the other four.

 

As for the database, that's what me and my mentor originally wanted to do, but we have no direct access to the server, and thus no access to a database that we can set up.  There is a database, but it's set up for an alumni registry, and that's out of the question.  So we want an uploading form that the secretary can submit a file and set the date.  Then the server will convert accordingly.

 

Again, thanks a million for the info.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.