Category "php"

Call to a member function fetch_field() on a non-object MySQLiDB

Hi i cant use INSERT UPDATE function with this class: MySQLiDB. Im trying write data to mysql and if exists this data then need update. So i use INSERT ... ON D

PHPMetrics option --excluded-dirs="myfolder" : myfolder dir is not excluded within docker

I'm trying to use PHPMetrics within Docker image. I run the next command in the project root folder: docker run --rm -v `pwd`:/project jolicode/phaudit phpmetri

Wordpress : ACF image not showing

i try to display image but with Basic display (Object) but no showing <?php $image = get_field('image'); if( !empty($image) ): ?> <img src="&l

Passing PHP JSON to Javascript: echo json_encode vs echo json declaration

I'm trying to create a common constants file to share between php and javascript, using JSON to store the constants. But I'm wondering why pass the JSON from PH

How to install php_imagick on wamp64

I've been trying to install php_imagick on wamp64 without any luck. The desired goal is for WordPress to stop showing the error message: The optional module, I

How to test a php login connected to a mysql db through xampp?

hello this is my first post on stackoverflow i am at beginner level at php, mysql and work on a php log in page connected to a mysql database which i did try to

class LaratrustSeeder does not exist

I tried to clear the cache and config and do vendor and dumpload everything but keeps telling me the class Laratrust does not exist I am using laravel 8 any s

Elastic Beanstalk with Laravel Envoy

I write a bash script to run the laravel envoy command in Elastic Beanstalk. #!/bin/sh cd /var/app/current/ sudo php vendor/bin/envoy run fillData & And it

The usage of `header("Content-type:application/json");`

I just created an JQuery ajax function to retrieve some json-encoded data from PHP, here's my code : file name : bank.php $('form').on('submit', function(){

(Cache::lock()) -> get() -- Under what conditions does it return false?

I'm looking into using the Cache::lock mechanism with laravel, but something isn't exactly clear to me. This is the example they use: $lock = Cache::lock('foo',

Cant seem to get the Pagination to work on my WooCommerce REST API application?

What I got so far: [ 'wp_api' => true, 'version' => 'wc/v3', 'query_string_auth' => true //Force Basic Auth

Check for PDO Results, If None Display Message, If Yes then Loop Through

Trying to find another simple answer but only finding complicated examples. I'm trying to simply query a table, if there are results to display then loop throug

How to disable Warning: mysqli_result::fetch_array(): Couldn't fetch mysqli_result [duplicate]

For my PHP I get a warning message: Warning: mysqli_result::fetch_array(): Couldn't fetch mysqli_result in /var/www/scorebord/loader.php on l

I want to use codeigniter foreign character library in my custom PHP project how i can use it?

this is array of foreign characters how I can use it in my own project. $foreign_characters = array( '/ä|æ|ǽ/' => 'ae', '/ö|œ/' =

MySQL connection and disconnection frequency

Is it better to open and close a new MySQL connection every time a query is made or to keep the connection open and run multiple queries in a single MySQL sessi

MySQL connection and disconnection frequency

Is it better to open and close a new MySQL connection every time a query is made or to keep the connection open and run multiple queries in a single MySQL sessi

Component install error: JInstaller: :Install: File does not exist

I have created a component simply by following this video. I have created my component named admin.zip. I am getting this following warning while installing in

How can I easily switch between PHP versions on Mac OSX?

I would like to test my application on PHP 5.3 up to PHP 7.0. Where and how can I install the versions and how can I switch them by running a small script?

Remove "estimated for {country}" text after tax amount in Woocommerce checkout page

I set up a 19% standard tax amount in my Woocommerce Online-Shop. Unfortunatley - now there is a text "estimated for Germany" behind the (includes 20,12 €.

Using Associative arrays

I'm trying to access a position of a associative array which is inside of another array. Here is my array: Array ( [order_data] => stdClass Object