Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 months ago. Improve this question I have an encoded string, how do I decode it eNpTNXdSNTJKLSrKLwLSqsaOJUWlqapGzkBOSmpxMlQQSK…
Call to undefined function IlluminateFilesystemsymlink()
I am installing a php script on my server as a test but I’m experiencing this error. Since I am a begginer in PHP language I am having trouble understanding what is wrong with the script code. I enabled debug mode on the application and got this error message ”Call to undefined function Illuminate…
How to rewrite the images path according to the written rules of the url?
I am trying to rewrite the url of an application with parameters. I have a link in the main file main.php. In the index.php file, there is an image tag with the src pointing to ìmages/ folder. All this works just fine. The problem occurs after writing the URL. This is what I have in the .htaccess file I now
PHP – Sum Array key value where 2 or more other keys are equal while keeping array structure
I have this source array(): $source[] My goal is to reduce it so that i get only 1 item where user_id & item_id are the same: $result[] The ultimate way would be to use an array_reduce, but i’ll take a foreach loop. I’ve tried this, but i get an empty array or this, but i get an array with use…
PHP make array element 1.5 bigger than previous one
I have a code below. It needs to make array element 1.5 bigger than previous one. Expected outcome should be … 1, 1.5, 2.25, 3.375.. and so on but i get error (undefined offset) But it doesn’t seem to work. What my code should look like. Answer Your array is empty to start with, so $array[$i] * 1.…
On duplicate key update – implode $row_arr
I have a script in php that writes to the mysql array: $nr_order is the same for all plu in this order. Works correctly. Adds what you need to the database. I would like to do INSERT ON DUPLICATE KEY UPDATE on the same principle I wrote something like this: But this solution writes nothing to the database and…
PHP data array coding [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 9 months ago. Improve this question So I am trying to pull data from a website api, they didn’t have any documentation fo…
How does php substr deal with two offset values? [closed]
Consider the following: echo substr(“abcdefgh”, 1, -1); // outputs bcdefg echo substr(“abcdefgh”, 2, -2); // outputs cdef Seems like substr is taking first numeric parameter as …
Sending Link Headers for Early Hints in PHP
Cloudflare has introduced Early Hints based on Link Header. I am a little bit confused about how I should send the link header in my PHP script. As I understand, I should send the Link Header for the links to preconnect I think we can send HTTP 103 Early Hint via PHP headers Is it enough? Answer No, you actua…
How to assert if a phpunit test writes a certain log entry / how to assert if emails are sent
I have a service class in my symfony5 project on php8, which is sending emails following certain rules. With my test want to check if the correct mails are sent. This task exists for several projects, so I really want to find a solution for this. The method, which collects the receiver of the mails is current…