Skip to content

Regex letters are not allowed when they should be?

My and my group are trying to create a simple PHP code editor that also executes the code without the use of a library. We know the risks that come with eval(), but since it’s all running on a local server it shouldn’t be a problem. The Regex part is definitely the problem since we have no clue ho…

Using $this when not in object context in PHP

I don’t know why i’m getting this error: Fatal error: Uncaught Error: Using $this when not in object context in C:xampphtdocsappindex.php:19 Stack trace: #0 {main} This is my index.php and where …

Limit Comment in Post Laravel

So this is the problem, I have application with post and comment. But I want to limit the comment per user, So if there is 1 post only 1 comment per user. Is it possible ? Here is my store function in CommentController: What query can I add in this store function to limit the user to only comment once

Substract an amount of time to an addition of times

I have to substract 32:30:00 (string) to 95:05:00 (string) in php : THey are coming from an addition of time . I can’t find any code working, cause strtotime doesnt accept more than 24 as a value . Please help me, thank you. For example, i ve tried this : It returns 0 It should return something like 62:…