开发者

How to add link to media on website PHP MYSQL

Ok first off let me state that I am new to PHP.

So What I want to do is allow a user to add a pdf or an image or video to my website. Once added it will generate a link to this uploaded media file. I would also like for the directory to be randomized so a new media file would never overlap the one before. I would also like it to be in a new table linking to my first table. I would then when I display the first table info like the media links displayed. How would I do this and display this?

Any Help Would be Grea开发者_如何转开发tly Appreciated. Thanks!


Well since you are new to PHP, I would suggest diving into a PHP framework, which will help you learn a little faster and give you very powerful tools (as well as great documentation on how to use them, without the need to build them from the ground up).

Since I have had most of my experience (and happen to like as well) I would suggest CodeIgniter to start (cakephp is an alternative too, as are others).

What you want is to get started with file uploading, basically enable random names for that file (don't worry about something like random folders, just randomize the names and save them / pass them to the user, however you see fit).

Start by learning more, read through the user guide, here is a link to the upload functionality:

http://codeigniter.com/user_guide/libraries/file_uploading.html

I think that should help you achieve your goal, it is not a walkthrough guide, by any means, but it gives you the valuable tools to get the job done.


Well, we cannot implement that for you. All you requested could be implemented pretty straightforward. So if you see specific problem you don't know how to implement - we might suggest you.

From the other side, I would suggest looking at existing upload scripts with required functionality.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜