Jump to content

uploading files into my forum-based website


aeroboy

Recommended Posts

Hello,

I am in the process of creating a PHP/MySQL forum-based website. This is my first time working with PHP and MySQL; I have a few questions.

I want users to be able to upload .pdf files along with their posts. How is this done? How does the system handle such uploads? Is there a maximum allowable size for an attached file to be posted?

Any advice would be very much appreciated.

aeroboy
In principle, if it's your forum, there are no such limits; however, PHP usually has a maximum execution time for each script, which limits upload size from a practical sense. Also, MySQL has a maximum query size as well, meaning you can't upload a 10MB PDF file all at once. As far as the PHP side goes, you can change this maximum timeout; on the MySQL side, it's not so simple. IMHO, the best way to go is simply to store the file on the server OUTSIDE the DB, and simply have a DB table that stores the path, filename and filesize of each upload.

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.