So I’m new to MQTT and I have to make a “messaging” project that loads all the messages (sent to a certain topic) in my index page without a long load time, I’m working with Yii2 Framework Advanced Project and I’ve already done the publish code, in the model I created the AfterSa…
Tag: php
How to open a text in the same html page by not creating a same page?
For example, when I open a topic, it would open in the same html page, not redirect to another address: http://web.archive.org/web/20090409012115/http://www.europeangoldfinch.net/home.htm# I want to make it exactly like this (clicking on a topic). I downloaded the source files from web archive, but when I cli…
Laravel 8 Controller does not exist, namespace is in routes and problem only exists on an apache webserver but works locally
I’m currently trying to get a small laravel 8 project to work on an apache webserver. It works on localhost with artisan and in xampp, however doing exactly the same on the apache webserver I have access to doesn’t work. This is my Controller with namespace and its name: These are the functions I&…
How can get the name of a image stored in /storage/public if was dynamic name
My problem is that i upload a image on the website in laravel but the database save the path of my local storage with a strange name and extension: The picture was uploaded fine in Storage/app/public but with another name (Like a hash code): Now, how can get this name in /Storage/Public with a query on a data…
Limit wp_count_posts to the last 7 days
I want to display the total number of posts within a post type, but limit it to the last 7 days. This is my current code successfully displaying the total amount of posts within the custom post type. <?php $published_posts = wp_count_posts($type = ‘games’)->publish; echo $published_posts;?&g…
Database update through checkbox change
For my thesis, I am working on a program for checking cars. Currently, I am working on the user management now I have encountered the problem that the database needs to be updated when a checkbox is changed status. Image checkboxes: Now I have already started looking a bit on how to execute a PHP function whe…
new laravel package not recognized
I was writing my first laravel package, so I could use it and understand how packages work and learn how to write packages and etc. But my project didn’t recognize the package that I wrote. Here is my package Github link: https://github.com/IIIphr/Shamsi_Calendar And this is my main project: https://git…
TCA override on showItem when sys_language_uid != 0
I’m updating a TYPO3 v8.7 to TYPO3 10.4 LTS In the TCA we have a pageType with a showitem of our choice. In v8 we used the following to have a custom view for a translated page eg. pages_language_overlay Question: What would be the correct way to get have this behaviour again since pages_language_overla…
Mongodb php datetime filter not working properly
I use mongo db with php I need a last 1 hour data. I implement as like bellow. PHP CODE I need a count result. thanks in advance Answer I am not so familiar with PHP, but I think $client->$db_name is equal to $client->selectDatabase($db_name) However -> does not work with variables, so $client->$d…
Adding custom text after order total in Woocommerce orders and emails
I am using this to display a custom text for customers from specific countries on the cart and checkout page: This does however NOT add the custom text after the order totals in the plain order emails that Woocommerce is sending. I know there is a filter woocommerce_get_formatted_order_total but I cannot seem…