Skip to content

Cant echo anything after cURL in PHP

I have a curl that works fine. The file where the cURL is placed is a PHP file, executed by .ajax I am echoing an $apikey at the end of the PHP file, without the cURL script. it prints correctly. …

pg_insert(): Accepts only string key for values

I’ve got postgres table with an auto-incremental column, and attempting to insert data from PHP with pg_insert returns a string key error. How would I go about modifying this for the different datatypes? Currently returns the following error: A var_dump returns: My Postgres table is made up of: Answer F…

How to change dateformat on Yii platform?

I am new to the Yii platform, and I am wondering how to change the dateformat. It’s currently in the American date format that is YYYY-MM-DD. I want it to be DD-MM-YYYY. Is there any way to this? Answer config file add in ‘components’ => [] You can add it and edit it to your style.

Importing large number of pdfs into mPDF is causing /fopen to fail

Edit: Updated after assistance from Jan Edit: The code dos not fail until $mpdf->Output($max . ‘ imports .pdf’, ‘D’); is called PHP Version 7.1 MPDF Version 8.0.10 Setasign fpdi_pdf-parser Version 2.0.4 Error Failed to open file (fopen) Compnay Induction (checklist) th v2.pdf Failed…

PHP ForEach Array – display variables

I have a Curl query which outputs JSON as $response $response = curl_exec($curl); $response = json_decode($response, true); I have turned this into the below Array: Array ( [results] => Array …