致命错误:已用尽 33554432 字节的允许内存大小(尝试分配 12288 字节)。
这就是我尝试上传大约 2,94 mb 的图像时遇到的错误。
当我上传 100kb 的图像时,它工作正常。为什么是这样?
我怎么能做一个限制,所以如果你上传超过 xx 个字节,那么你会得到它太大的错误,所以我不会得到那个致命的错误。
我开始在表格上做这个
$max_file_size = 8388608;
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_file_size ?>">
Run Code Online (Sandbox Code Playgroud)
这是我的文件上传:
<?php
include "dbc.php";
$directory_self = str_replace(basename($_SERVER['PHP_SELF']), '', $_SERVER['PHP_SELF']);
$uploadsDirectory = $_SERVER['DOCUMENT_ROOT'] . $directory_self . 'images/profilePhoto/';
$uploadForm = 'http://' . $_SERVER['HTTP_HOST'] . $directory_self . 'editProfile.php';
$uploadSuccess = 'http://' . $_SERVER['HTTP_HOST'] . $directory_self . 'home.php';
$fieldname = 'file';
// possible PHP upload errors
$errors = array(1 => 'php.ini max file size exceeded',
2 => 'html …Run Code Online (Sandbox Code Playgroud) 我知道我可以使用mod_expires添加expires头.但是,如果Apache服务器没有安装mod_expires并且我不想通过像PHP这样的脚本语言来访问文件,我该怎么办?
我在我的Rails应用程序(config/locale/[en | de] .yml)中有一些翻译,我在我的视图中使用它<%=t "teasers.welcome" %>.例:
teasers:
welcome: "<strong>Welcome</strong> to the Website ..."
Run Code Online (Sandbox Code Playgroud)
在Rails 2.3.8中这很好用,使用Rails 3,HTML被转义并转换为<...如何防止这种形式的翻译并在我的翻译文件中使用HTML,如Rails 2.3.8?
I have an XBAP that needs to be able to burn cd's. When running from inside Visual Studio, everything works okay. However when running from a browser, the IMAPI dll reports that the environment is not supported as soon as it tries to access the drive.
I am assuming this is coming down to permissioning. I have a signed certificate which I have installed and the xbap is set to run as a full trust application (although I'm guessing that …
Hallo can someone explain the behaviour of strtotime function with year in non-standard format.
echo date("d-m-Y",strtotime('02-12-10')) .'<br>'; //10-12-2002
echo date("d-m-Y",strtotime('09.09.10')) .'<br>'; //02-09-2010 --How this is interpreted?
echo date("d-m-Y",strtotime('02-12-2010')) .'<br>'; //02-02-2010
echo date("d-m-Y",strtotime('09.09.2010')) .'<br>'; //09-09-2010
Run Code Online (Sandbox Code Playgroud)
I wanted to convert strings of format dd.mm.yy(09.09.10) to datetime format.
I have the following stored procedure:
procedure getInfo ( p_ids IN IDS_TABLE, p_details OUT cursor )
Run Code Online (Sandbox Code Playgroud)
Type IDS_TABLE is:
create or replace type IDS_TABLE as table of IDS
create or replace type IDS as object ( id1 NUMBER, id2 NUMBER, id3 NUMBER )
Run Code Online (Sandbox Code Playgroud)
How can I call getInfo in Java?
Can a static libary *.a in Linux be dynamically loaded at runtime?
I've read here that
...both static and shared libraries can be used as dynamically loaded libraries.
How to dynamically load static library?
有没有办法在没有WebViewin活动的情况下检索浏览器的用户代理?
我知道有可能通过WebView以下方式获得:
WebView view = (WebView) findViewById(R.id.someview);
String ua = view.getSettings().getUserAgentString() ;
Run Code Online (Sandbox Code Playgroud)
但在我的情况下,我没有/需要一个webview对象,我不想只是为了检索用户代理字符串而创建它.
java ×2
php ×2
.htaccess ×1
android ×1
apache ×1
c# ×1
c++ ×1
cakephp ×1
html ×1
imapi ×1
jdbc ×1
linux ×1
localization ×1
mod-expires ×1
oracle ×1
scala ×1
translation ×1
user-agent ×1
webview ×1
xbap ×1