Category "php"

how to identify the web server name of remote host

According to this solution link it shows how to get the web server name for a local web server but how to do the same for a remote server by URL ? i.e. $_SERVE

how to see if database exists with PDO [duplicate]

So I recently decided to switch to PDO due to the mysqli prepared statement complexity and irregularities. This was my mysqli function to test

WooCommerce: Add/display Product or Variation custom field everywhere

Currently using WordPress 5.1.1 and WooCommerce 3.5.7. My WooCommerce store has around 500 products, made up of simple and variable products. Each product natu

How to run or debug php on Visual Studio Code (VSCode)

I can't find a way to run or debug php on Visual studio code, Does anyone know how?

Image Video Thumbnail creating using PHP-FFmpeg

I am using PHP-FFmpeg for video thumbnail genaration. My code is below <?php $video = "a.mp4"; $image = "thumb.jpg"; $frame = $video->frame(FFMpeg\Coordi

how to save and update menu in php laravel

I want to create an admin panel where I can change almost everything of the pages. Should we save every menu-item and its children in a different table in the d

SMTP "Error: DATA not accepted from server!" Opencart 2.3 on InMotionHosting

I've installed a brand new Opencart 2.3.0.2 on Inmotionhosting with all default settings except MAIL settings which I've tried many different combinations. Alth

SMTP "Error: DATA not accepted from server!" Opencart 2.3 on InMotionHosting

I've installed a brand new Opencart 2.3.0.2 on Inmotionhosting with all default settings except MAIL settings which I've tried many different combinations. Alth

Unsure why I am getting: Number of variables doesn't match number of parameters in prepared statement

I am trying to do a simple test but am experiencing errors. I am trying to add the parameters and I have done some research, none of which has helped me underst

WooCommerce Additional Information - if empty, hide

I'm working on an eCommerce project at the moment. I'm using WooCommerce in WordPress. I've got ridden of the product data tabs and displayed product descripti

Access denied for user 'homestead'@'localhost' (using password: YES)

I'm on a Mac OS Yosemite using Laravel 5.0. While in my local environment, I run php artisan migrate I keep getting : Access denied for user 'homestead'@'local

how to search for a file with php

First thing is first. I am not a php developer this is something that is needed for my job so I took it on and I am learning as i go Right now we have an excel

Redis Command To Sort Keys

The Redis command keys * will return a list of all keys and scan 0 is a more recent way to do something similar, but with less blocking. Do any commands exist t

How to Install Composer Require doctrine/dbal

In the Laravel framework, I am trying to modify my columns using change() by migrations. Right now, I need to install... composer require doctrine/dbal I am

Laravel 5 issue with wherePivot

I am working with Laravel 5 and I am having issue getting ->wherePivot() to work on a Many-to-Many relationship. When I dd() the SQL it looks like Eloquent i

Custom add to cart button URL for specific product in WooCommerce?

I would like the user to be directed to a certain URL when they click the 'add to cart' button. At the moment I have this: /** * Set a custom add to cart URL

Adding reCAPTCHA v2 into my PHP file

The PHP problem has been solved. Here are the HTML and PHP codes that I'm using: contact_form.html: <html> <head> <title>My Contact Form

Composer Script echo

What is the best way to echo to the console in a composer.json script? For example, I have used the scripts section to create a custom installer and at the end

PHP: Print caught exception like Xdebug

I have a PHP function which I call when I caught an exception. It accepts that exception as optional parameter, so it can show it for debugging purposes: publi

Laravel excel maatwebsite 3.1 import, date column in excel cell returns as unknown format number. How to solve this?

By using Maatwebsite/Laravel-Excel version 3.1 to import excel sheet, here I faced an issue date time column of the excel sheet returns unknown number. How to s