Skip to content

Tag: php

cors blocked cant fetch [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 6 months ago. Improve this question I am receiving this error on my console Here is my link of web you c…

Laravel DOMDocument : failed to open stream: Permission denied

I’m trying to generate xml file in Laravel, I use DOMdocument but I got this error message when I try to save the file : Code in blade file : I know it’s something with permission but i’m not sure where to change the permission and for what. Thank you for help in advance. Answer Seems you ne…

CakePHP4 Edit doesnt update record

Version: 4.2.9 My edit view is populating my inputs with the data, but when I change them and click on save, its not saving but giving me “user has been saved” message. UsersController.php edit function my edit.php Answer Your update code is not complete, you have omitted the patchEntity method.

Carousel images are stacking, how do I stop them from stacking?

I’m trying to pull the most recent four images from a database into a carousel. The images are stacking on top of each other as one single slide of the carousel. I want them to be on four separate slides. The carousel code: I have included these: I will leave an example of what I mean here. Answer Your …

How can I rewrite this xml file with the correct encoding using php?

I want to rewrite an xml file without the encoded characters using php. My xml file looks like this: How can I fix the issue with the encoded characters? Is there any way I could use php to rewrite the file? thanks. EDIT: This Is my code that takes an xml file, and then splits it into piecies based on

How to add double quote to array values php [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 4 months ago. Improve this question I have an array like below format: But I want to convert the array so i…

PDO json_decode before fetch into class

Is there a way to json parse string before making it a class with PDO? I don’t like using union types. In the example below contact is of type json in the database. PDO User class Answer As Movahhedi suggested you could use PDO::FETCH_FUNC, but the json_decode() should take place in the passed function,…

How to get form data with session in Symfony Form

I’ve been looking for a solution for hours. I’am working with Symfony 3.2. I’am using Symfony Forms in order to display a data-table (with different filter chosen in the form) with Ajax => No submit button. I can access to different result of data-table to view more information. What i wa…