我为此感到疯狂.
我收到了下一条消息:
Allowed memory size of 262144 bytes exhausted (tried to allocate 24576 bytes)
Run Code Online (Sandbox Code Playgroud)
TODO LIST
检查phpinfo(),获得正确的php.ini路由并进行编辑.将memory_limit更改为
memory_limit = 128M
Run Code Online (Sandbox Code Playgroud)
确保值memory_limit使用结果更改con phpinfo():
memory_limit 128MB 128MB
Run Code Online (Sandbox Code Playgroud)
检查.htaccess并添加(不需要)
php_value memory_limit 128M
Run Code Online (Sandbox Code Playgroud)
并且还通过php更改它(在错误行之前):
ini_set('memory_limit','128M');
Run Code Online (Sandbox Code Playgroud)
它说到处都将内存设置为128M,但仍然会出现错误?
错误发生在Swift库(用于发送电子邮件的库)中,在abstractSmtpTransport.php中,所以它不是我的代码int的工作.
有任何想法吗???
编辑:是的,前一个完成重启apache.
编辑2:@patrick,补充说,但没有回应
尝试使用较低的值,每个文件28M int,重启apache,同样的错误(phpinfo显示新值)
尝试使用-1,重新启动,同样的错误.
编辑3:允许的内存大于分配的内存是不是很奇怪?(尽管允许的内存大小远低于实际允许的内存)
我正在提出一个 curl 请求,女巫已经完美地工作了几个星期,现在它返回了这个错误:
已用完允许的 262144 字节内存大小(尝试分配 76889 字节)
奇怪的部分是我检查了 php.ini 和 phpinfo 并且都告诉我内存限制是
内存限制 1028M
我也试过
ini_set("memory_limit","400M");
Run Code Online (Sandbox Code Playgroud)
在文件的顶部以确保,但仍然收到此错误。
这发生在开发和生产服务器中。
几个月来,我一直在使用一个类来生成一个在reintalls之间稳固的UUID.我的应用程序是关于折扣,所以我依靠这个UUID来限制每台设备的优惠券数量.
protected void getDeviceId(){
try {
Context context = cordova.getActivity().getApplicationContext();
TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
String uuid;
String androidID = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);
String deviceID = tm.getDeviceId();
String simID = tm.getSimSerialNumber();
if ("9774d56d682e549c".equals(androidID) || androidID == null) {
androidID = "";
}
if (deviceID == null) {
deviceID = "";
}
if (simID == null) {
simID = "";
}
uuid = androidID + deviceID + simID;
uuid = String.format("%32s", uuid).replace(' ', '0');
uuid = uuid.substring(0, 32);
uuid = uuid.replaceAll("(\\w{8})(\\w{4})(\\w{4})(\\w{4})(\\w{12})", "$1-$2-$3-$4-$5"); …Run Code Online (Sandbox Code Playgroud) 我无法通过.
我需要从jquery对象获取offset().top,这是我的代码
parentLi = $(element).parents("li");
parentLiOffset = parentLi.offset();
top = parentLiOffset.top;
left = parentLiOffset.left;
console.log(parentLiOffset);
console.log(top);
console.log(left);
Run Code Online (Sandbox Code Playgroud)
这就是控制台回馈的内容:
Object { top=208, left=311}
Window /demo/
311
Run Code Online (Sandbox Code Playgroud)
正如你所看到的,我无法获得"顶级"价值.我是firefox,如果这有任何区别的话.
谢谢!
我创建了一个堆栈闪电战:
https://stackblitz.com/edit/angular-ivy-ghhkp6?file=src%2Fapp%2Fapp.component.html
我做错了什么,但我不明白是什么。我基本上使用网站上的示例。
有什么帮助吗?
我正在从头开始创建一个独立的应用程序,我没有 ngModule。
我正在创建一个翻译服务和一个使用它的管道。
在 app.component.ts 上测试它
import { Component, OnInit } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterOutlet } from '@angular/router';
import { I18nPipe } from './pipes/i18n.pipe';
import { I18nService } from './services/i18n.service';
@Component({
selector: 'ct-v4',
standalone: true,
imports: [CommonModule, RouterOutlet, I18nPipe],
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
title = 'ct-v4';
constructor(private i18nService: I18nService) {}
ngOnInit(): void {
this.i18nService.initLanguage('en');
}
}
Run Code Online (Sandbox Code Playgroud)
我的国际化服务:
import { Injectable } from '@angular/core';
import { HttpClient …Run Code Online (Sandbox Code Playgroud)