Skip to content
Advertisement

die() is not stopping code from executing

the problem is in the following: on the web browser it is executing the echo after the die(). on the CLI stops on the die() and does not shows the echo as expected. My Specs: PHP 7.4 (FPM) web server Nginx (also tried with apache with the same result) Also I had a time long a test server on windows

Download PHP ZipArchive returns corrupt, blank zip file

I’ve had a look at various threads about ZipArchive and how to get files to download. However, I’ve gotten a bit stuck here. I currently have a form that looks like this Within that form, are some aspects that come from the rest of the script, which is here: I’ve tested all of the other bits, like the generation of

Eloquent relationship returns nothing

I am trying to make a system that allow users to create playlists which add on it movies there favorites movies or songs. I named the main model “Top”. I also have models : User, Category, Liste_top (this name is bad but it make de junctions beetween a Top and a Movie/Song. A better name, I guess, would be something

Laravel migrate ends up in wrong database

I have the following settings in .env When I run Everything seems to be ok. But when I look at my target database “unwa”, it is empty. A die and dump revealed, that I was connected to another database “auction” that happens to be the first (alphabetically) database. I find all my tables in the “auction” database. How can I

Attempt to assign property “status” on null

I have the following code running on PHP 7.4.2, but after the update to PHP 8.1.2, I’m getting an error in order to fill an array with some data. I’m getting the following error: Fatal error: Uncaught Error: Attempt to assign property “status” on null Is this problem related to some change in PHP 8? I’ve tried to find some

AJAX with XMLHttpRequest doesn’t send data

I want to build a simple program using XMLHttpRequest to calculate the area of the triangle. I used this code for client-side; This code is for the server side. Even tried so many codes, It doesn’t send the data to server side. Answer I found the mistake. I was sending the parameters as part of the URL, but need to

Should you use prepared statments on LIMIT

One day I was googling to understand when a prepared statment should be used. As I searched online many claimed that you should use always prepared statments. Now the question I have is… does this also count for LIMIT? I mean it is possible (I tried) but is it really that rational? Same question on ORDER BY too. Answer When

Advertisement