Category "php"

Alternative to closing php tag and entering straight HTML when echo doesn't work

I apologize in advance for the horrible title; I'm sure there's a better way to ask this question, but I couldn't come up with it. I'll try to do a better job w

What is the optimized/best way to retrieve data from two tables?

I have two tables: post table: |post_id | post_title | +--------+------------+ | 1 | Post 1 | | 2 | Post 2 | | 3 | Post 3 | post_cre

What is the MIME type of .eml files in emails

I want to attach a MTA report (not delivered bounce mail) to an email, but what is the correct MIME type? I fetch the full body of the MTA report with $body = i

How do I outtput Azure cognitive services Text to speech (TTS) to MP3 file? Keep getting

I am using Azure Cognitive Services with text to speech (tts) in combination with PHP and Curl and while I am getting output, I am not getting anything usable a

How I can simulate the __callStatic property of PHP in Node.js using Proxy?

I'm trying to create the same behavior of PHP __callStatic magic method in Node.js. I'm trying to use Proxy to do that, but I don't really know if it's the best

Woocommerce Reports 'get_order_report_data' not working

I am getting null response on the below query. I am trying to get sum of the products subtotal and a custom cost field for products. I am able to get the data f

401 Invalid JWT Token Lexik

I'm not sure why i Keep getting a wrong bearer token. { "code": 401, "message": "Invalid JWT Token" } When i debug it on https://jwt.io/ i also get a Invalid S

How to Track Successful Payment on Coinbase Commerce Webhook Directly on my Website

Please I need help on how to to go about this. I am currently building a website to enable bitcoin payment directly on my website. After creating a checkout on

Laravel livewire sorting by foreign key

I'm trying to sort a post table by a foreign key, and can't figure out how to do it. Hopefully someone can lend me a hand. I can sort by the fields already pres

How can I calculate a really long number with modulo without using bcmod?

The bcmod function is deactivated and I won't be able to activate this because its not my own server. For a reason I need to calculate an integer with a length

Is using $wpdb->get_charset_collate() necessary when creating tables in WordPress?

When creating tables in WordPress, is it necessary to use $wpdb->get_charset_collate()? Wouldn't the default charset automatically be used? Example: $charset

PHP: Check for characters in the Latin script plus spaces and numbers

I am new to regex and I have been going round and round on this problem. PHP: Check alphabetic characters from any latin-based language? gives the brilliant reg

Laravel - Passing id from one page and reference that id for the next page's table data

Good day. I'm having a hard time solving how to pass an id from a table (Region table) and use that id as a reference (idParent) for the table (Province table)

Phpmyadmin error: 'Undefined index: utf8'

I installed phpMyAdmin, but I have an error on the main page: Notice in ./index.php#312 Undefined index: utf8 Index p.312: echo ' ' , $mysql_ch

Livewire retrieve Data from a relation manyToMany

in my blog project using livewire, i have a relationship manyToMany between tables posts & tags using a pivot table call post_tag when i want to edit a pos

Error when trying to open chamilo using LEMP on Centos7

I have been trying to set up Chamilo using LEMP stack (Linux, Nginx, MariaDB, PHP 7) on CentOS 7 using this link https://www.digitalocean.com/community/tutorial

JSON response TypeError - 'The "data" argument must be of type string'

The API I'm trying to fetch an access token gives me the following instructions (you can check for yourself at https://developers.finove.com.br/authentication):

laravel database error when I try to convert an string to datetime

I'm on Laravel project that I didn't start, my problem is when I try to do an insert on laravel. I need to insert a datetime, on Y-m-d h:i:s.v format but when i

Enable php on mac monterey

I try to install php on a mac M1 monterey, but this simple code is not interpretated : <?php phpinfo(); ?> I installed php with brew brew install php bre

ERROR when try to install cretueusebiu/valet-windows

Hi Guys i try to install cretueusebiu/valet-windows, but i found the error like this : $ composer global require cretueusebiu/valet-windows Changed current dire