Skip to content

Tag: php

PDO Connection with Json data [closed]

I want to get a PDO Connection with data from a json config file. I currently have this, but it doesn’t work and throws a fatal PDOException error $cfg = json_decode(“../config/config.json”); $host =…

Regex for FIGI numbers

I am trying to write some regex to match FIGI numbers. FIGI numbers have 12 characters and are built in the following structure: A two-letter prefix, excluding (BS, BM, GG, GB, GH, KY, VG) G as the …

Debug Toolbar in Codeigniter 4 not working

I installed Codeigniter 4.0.2 and did following changes: 1- CI_ENVIRONMENT = development in .env file 2- SetEnv CI_ENVIRONMENT development in .htaccess in public folder 3- Added $useKint = true; in main index.php file in public folder When I open at localhost, welcome page is rendered but no Debug Toolbar is …

How to modify post response in php

How to modify this response $url = “https://example.com”; $data = “{“phone_number”:”18868768″}; $len = strlen($data); $headers = array(); $otp = request($url, $data, $headers); the response is {“…