Skip to content
Advertisement

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 From the PHP manual: pg_insert() inserts the values of assoc_array into

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 to open file (fopen) Information Register for Employees.pdf Failed to open file (fopen) Coshh listings v7.pdf Failed

PHP: Why does this return “undefined offset” every time?

So basically this is an algorithm I made for a battleships game. I’m having problems with the while loop, I want to have the code inside the do while loop keep repeating, if the generated values already exist in a multidimensional array, and it looks like it actually works, because it generates correct values, but I keep getting the error

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 …

Advertisement