I have images for articles, and when I am updating article I would like to check if the images are the same, if not I would like to delete them but if it is possible I would like to delete the whole collection without another query, something like what I have in the code below $images->delete();. This is m…
Tag: php
Know when qr code is being scanned
As the title says..Is there a way that i can put a qr code in my webpage and when a users scans it whith his phone then the webpage(opened in a desktop computer for example) redirects the user to another page.NOT on the phone.I want to redirect the user when he scans the qr code but not on the phone..only
Difference between php-cli and php-fpm mode in regard to APC/APCu
The thought start from this question under php-cli mode: PHP apc/apcu cache do not keep intermediate result while shmop do, why? In this case, APC/APCu do not cache the intermediate result. However,…
How to change url after success in ajax without page reload
This is the ajax This works, but i want the url to change because I have many parameters there and of course with the data: “urut=”+$(“.urut”).val(), parameter as well. Answer You can do this to your success action : See this post to Modify the URL without reloading the page for a basi…
Failed to start The PHP 7.0 FastCGI Process Manager
i have problem with php7 when i run this command i get the error sudo systemctl status php7.0-fpm.service this output: Answer You probably must do this for me it works.
google analytics api v4 using PHP. Ordering output
I have this code on google analytics API v4 with PHP. $eCPM_Adsense = new Google_Service_AnalyticsReporting_Metric(); $eCPM_Adsense->setExpression(“ga:adsenseECPM”); $eCPM_Adsense->…
How to render json into a twig in Symfony2
The question is how to pass a json to twig to render a template. I’ve tried to pass a json with JsonResponse object but I did not find the way to render the template. TarifasController.php index.html.twig How can I pass a json from the controller to use it in the DataTable (in twig template) but mantain…
how to my receiver is typing a message and show on my browser
i want to check the user is typing a message and want to display it in my chat box, i know setting database flag and checking it by timeinterval function, but i think it should be slow method, is there any way to check it? by the users’s machine ip/id . Answer I have found that using sockets is the
Draggable and droppable items with multiple lists and orders
I am trying to find the order of the items as they are dragged over to the new column. I am updating the column that the item lives in once its dragged over with AJAX. I am also getting everything in order with $(this).sortable(‘serialize’). when I put that into an alert. The problem I am having t…
Icon flags with value in dropdown menu
I have bootstrap dropdown menu with options to select. I want to add country flag near text on left side. And I did it, but the problem is when i select the option in dropdown and submit it, the flag is sent via php/html too. I dont know how to place it here to do not submit the flag with