dougu3290 2013-07-23 22:25
浏览 37

增加文件上传大小但无法定位/访问php.ini

I'm testing a file uploading page etc that I'm working on. Chose a largish file at random and received:

Request Entity Too Large

The requested resource
/admin.php
does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit.

as an error message. Brief google led to changing values in php.ini but I can't locate or access it.

The site is hosted on a free site 000.webhosting.org - I'm guessing they have it restricted somehow. Is there a workaround?

  • 写回答

1条回答 默认 最新

  • douju7765 2013-07-23 23:23
    关注

    Create an .htaccess document and put it in you document root directory. Inside, place:

    php_value upload_max_filesize 10M

    Source: http://www.cyberciti.biz/faq/linux-unix-apache-increase-php-upload-limit/

    Honestly, I've never tried this, but it appears to be what you need.

    Edit:

    Here's something else I found, you can try: ini_set("upload_max_filesize", "xM"); where x is a number and the M signifies Megabytes. I'm not sure if it works with all versions, but it's listed as being editable on the php website (http://www.php.net/manual/en/ini.list.php).

    评论

报告相同问题?

悬赏问题

  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法