php.ini中的最大上传大小 [英] max upload size in php.ini

查看:63
本文介绍了php.ini中的最大上传大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨所有

我需要有一个页面,女士可以上传高分辨率图像供人们下载。我认为大约60 MB对于她需要的一切都应该足够大但我知道php有局限性我正计划将这些图像存储到mysql数据库中,但我可能需要找到一种新方法。那么您认为我应该如何更改我的php.ini文件并将图像上传到我的数据库,还是应该找到新的解决方案。


eric

hi all
i need to have a page where a lady can upload high resolution images for people to download. and i was thinking that about 60 MB should be plenty large for everything she needs but i know that php has limitations and i was planing on storing these images into a mysql database but i might need to find a new way. so what do you think should i just change my php.ini file and upload images to my database or should i find a new solution.

eric

推荐答案

我个人不喜欢将图像存储在数据库中,只是文件名。这样,图像就可以保留在服务器目录中,而db条目指向它。

但是你的上传过程仍然是一样的。

我会选择上传,将其保留在图像目录中并将文件名存储在数据库中。


Ronald:很酷:
Personally I don''t like to store images in the database, just the file name. That way the image can just stay in the server directory and the db entry points to it.
But your upload process will still be the same.
I would go for the upload, leave it in an image directory and store the file name in the database.

Ronald :cool:


好听但是怎么做我使用html表单上传图像,并将其存储在数据库以外的其他地方。


eric
ok sounds good but how do i use an html form to upload an image and have it stored somewhere other than a database.

eric


而不是显示大量代码,我将通过散景在图片上传样本


上传的图像将存储在脚本运行目录的subdir uploaded_files中。上传目录在声明中定义

Instead of showing a lot of code, I will point you to a complete sample for an image upload by bokeh at image upload sample

The uploaded image will be stored in the subdir uploaded_files of the directory in which the script runs. The upload dir is defined in statement

展开 | 选择 | Wrap | 行号


这篇关于php.ini中的最大上传大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆