Category "php"

How to launch scripts after installing a package via Composer?

I use the command composer require otra/otra:dev-develop --no-update --no-cache && composer update --no-autoloader to install my own framework. I have p

How to pass security cloudflare server with php curl

I used curl for getting data from biorxiv site. This is not an illegal job. $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => '

401 Unauthorized only occurring on some pages in Laravel 8

Have created an app in Laravel 8, and have used the PHP artisan command "ui:auth" to create a login system, which works fine. However, when trying to use "auth(

PHP: PDO + CSV export not downloading (headers issue?)

I'm having a hard time making my CSV export function work. I've found around plenty of examples using mysqli_* functions, but I'm actually using PDOs so I had t

Last order would be re-order in wooCommerce. How is it possible?

I am developing a woocommerce site that has 3 categories like vegetable, Fast food & Fish. vegetables are the main category of his eCommerce site. My client

add " ? " in url via htaccess RewriteRule

i try use RewriteRule in htaccess i want my url site.com/f_search.php?langs=en&langs=en works like site.com/en/new.php?/en/f_search i used this code in

Sort multidimensional array by column value within a column

I have an array in PHP and I need to sort by a nested array inside of the array... Here is my array: Array ( [0] => Array ( [project_

PHP array, move keys and values to new array, but mix it up

so I need to convert a PHP array i'm getting from a form post, so that I can use it more usefully in a db. Array ( [first_name] => Array ( [0]

zsh: command not found: php

I have been using php with mamp on mac for a year even with old versions of MacOS, since I installed MacOS Monterrey if I type php on the terminal I get a messa

How to embed a pdf file in an excel worksheet using phpspreadsheet?

How to embed a pdf file in an excel worksheet using phpspreadsheet? $file= 'kl.pdf'; $objDrawing = new PHPExcel_Worksheet_Drawing();

Codeigniter send email OpenSSL error

I am having trouble sending email. I don't know what to do. I already un-commented the extension=php_openssl.dll in php.ini file, but I still receive this error

Building a Post listing with ACF Block that allow to query by taxonomy

I am trying to build an ACF block that allow to display a list of custom post types featuring custom fields. everything works well if I hard code the category t

using random function but it's displaying duplicates

I am using the random function in twig and it is randomizing the images I need but it is repeating the logos. How can I make it so that the images are not repea

Match single unknown parameter php (Morse-code Regex)

I have an function that checks if string( parameter) matches values in an array and returns an array of possibilities key function find_possible_match( $criter

Log file is not being written in Laravel 5.5

I have logging enabled by default on Laravel 5.5. The settings are: In config/app.php file: 'log' => env('APP_LOG', 'single'), 'log_level' => env('APP

Laravel - Implicit route model binding with soft deleted data

I am having a small issue. There are two user roles and one is a normal member and one is an admin. The member can delete a blog and they will not be able to se

printing all running session variable in laravel 5.1

How do I print all running session variable in Laravel 5.1? I want to print all the running session variable. Currently I can retrieve single running session f

laravel automatically deletes server.php on php artisan serve

I am using laravel 5.6 on windows environment using php 7.2, (installed with xampp).After installing laravel the 'php artisan serve' command work but automatica

Console/Symfony Call command from controller

I have some issues with Console when I try to call a Command from a Controller. I found a way in the Symfony CookBook : http://symfony.com/doc/current/cookbook/

Give a radio button a hidden text value through selecting an image that is stored with that name in the database PHP/Html

Hello infinitely more knowledgeable stack overflow community. I am trying to accomplish the following: There is this quick form a user fills out and part of tha