草庐IT

St9bad_alloc

全部标签

php - 如何在 curl php 中解决 HTTP/1.1 400 Bad Request

我必须从php代码中点击一个.aspx页面url我正在尝试使用curl进行点击,但出现以下错误并且url中没有空格。HTTP/1.1400BadRequestContent-Type:text/html;charset=us-asciiServer:Microsoft-HTTPAPI/2.0Date:Mon,05Oct201508:31:13GMTConnection:closeContent-Length:311Bellow是我试图命中的curl代码。所以任何人都会告诉我为什么会收到此错误。$api_url='http://www.test/xyz/OnlineOrder.aspx?

php - fatal error : Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes)

这个问题在这里已经有了答案:关闭10年前。PossibleDuplicate:Allowedmemorysizeof33554432bytesexhausted(triedtoallocate43148176bytes)inphp我在执行我的代码时遇到了以下错误。Fatalerror:Allowedmemorysizeof134217728bytesexhausted(triedtoallocate32bytes)也尝试了ini_set('memory_limit','128M');但没有用。我的php.ini文件中的内存限制是128MB。请帮助。我正在添加代码。我是php的新手,请帮

PHP GD : Bad quality on resize?

我不喜欢我输出的调整大小的图像,imagecopyresized($resized_img,$new_img,0,0,0,0,$newwidth,$newheight,$width,$height);ImageJpeg($resized_img,"$path_thumbs/$rand_name.$file_ext",100);我在ImageJpeg中添加了100,因为我希望提高质量,但它并没有变得更好。我如何提高调整大小的图像/缩略图的质量 最佳答案 尝试使用imagecopyresampled反而。这会进行插值,这会让事情看起来更

file-upload - PHP fatal error : Out of memory (allocated 80740352) (tried to allocate 12352 bytes) in

当用户在我的网站上上传图片时出现此错误。错误消息是“PHPfatalerror:/home中内存不足(已分配80740352)(已尝试分配12352字节)......”我该如何使用php.ini解决这个问题?这是我当前的上传php.ini设置upload_max_filesize=2000M;post_max_size=2000Mmax_file_uploads=8有什么想法我还需要添加什么来解决这个错误吗? 最佳答案 最佳memory_limit值取决于您对上传文件的处理方式。您是使用file_get_contents还是GD库将

php - 在下拉列表中显示 Parent & 1st Level CHILD 类别 Wordpress

我目前有这段代码可以在下拉列表中显示所有父类别。HTML/PHP代码'name','hierarchical'=>1,'taxonomy'=>'category','hide_empty'=>0,'parent'=>0,);$categories=get_categories($args);foreach($categoriesas$category){echo'cat_ID).'"title="'.$category->name.'">'.$category->name.'';}?>下面的代码没有问题。实际上,它工作得很好!你可以在我的wordpress网站上看到它:www.bend

file-upload - PHP fatal error : Out of memory (allocated 80740352) (tried to allocate 12352 bytes) in

当用户在我的网站上上传图片时出现此错误。错误消息是“PHPfatalerror:/home中内存不足(已分配80740352)(已尝试分配12352字节)......”我该如何使用php.ini解决这个问题?这是我当前的上传php.ini设置upload_max_filesize=2000M;post_max_size=2000Mmax_file_uploads=8有什么想法我还需要添加什么来解决这个错误吗? 最佳答案 最佳memory_limit值取决于您对上传文件的处理方式。您是使用file_get_contents还是GD库将

php - fatal error : Allowed memory size of 67108864 bytes exhausted (tried to allocate 39 bytes) in xxx/xxx/xxx/xxx

关闭。这个问题不符合StackOverflowguidelines.它目前不接受答案。这个问题似乎不是关于aspecificprogrammingproblem,asoftwarealgorithm,orsoftwaretoolsprimarilyusedbyprogrammers的.如果您认为这个问题是关于anotherStackExchangesite的主题,您可以发表评论,说明问题可能在哪里得到解答。关闭6年前。Improvethisquestion我在godaddy托管了一个drupal网站。但现在有几天我正在与最奇怪的问题作斗争“fatalerror:允许的67108864字

php - preg_replace : bad regex == 'Unknown Modifier' ?

我正在编造假的电子邮件地址,我只是想确保它们采用有效的电子邮件格式,所以我试图删除不在以下集合中的任何字符:$jusr['email']=preg_replace('/[^a-zA-Z0-9.-_@]/g','',$jusr['email']);我在我的windows机器上没有遇到任何问题,但是在linux开发服务器上我每次运行这段代码时都会收到这个错误:Warning:preg_replace()[function.preg-replace]:Unknownmodifier'g'in/var/www/vhosts/....我认为这是正则表达式字符串,但我无法确定。帮助不大?谢谢。澄清

php - fatal error : Allowed memory size of 134217728 bytes exhausted (tried to allocate 87 bytes)

当我登录到我的Web应用程序时,它显示如下错误:Fatalerror:Allowedmemorysizeof134217728bytesexhausted(triedtoallocate87bytes)in/gt/2.ps.fo/home/hft/domains/console.fo.spalgo.com/public_html/cake/libs/model/datasources/dbo/dbo_mysql.phponline775有什么办法可以解决这个问题吗?为什么会出现此错误? 最佳答案 听起来你已经分配了morememor

php - Laravel 社交名媛 Facebook 错误 : "POST https://graph.facebook.com/oauth/access_token resulted in a ` 400 Bad Request` "

这个问题在这里已经有了答案:OAuthError:ThisIPcan'tmakerequestsforthatapplication(4个答案)关闭3年前。我已经使用LaravelSocialite为facebook进行了社交登录,并且运行良好。我没有改变任何东西,现在它不起作用。尝试登录时显示此错误:客户端错误:POSThttps://graph.facebook.com/oauth/access_token导致400错误请求响应:{"error":{"message":"ThisIPcan'tmakerequestsforthatapplication.","type":"OAut