Skip to content

Tag: php

Codeigniter Multi Save Upload Path

I try to save the uploaded file in 2 paths, one inside a folder and contain the id and one outside the folder Here’s my code : When I run that code, the result is stucked Can you help me what’s wrong? Answer You set the upload_path key twice, which just overwrites itself. You’ll need to proc…

Laravel 8: How to validate entering dimensions

I have a form and there is a field in this form called dimensions and users MUST enter a value like this: 10x10x10 So I am separating length, width and height by x. But now I don’t know how to make this validation with Laravel: So the question is: How can I force users to separate each dimensions by wri…

How can I set an api token in php?

I am currently working on my website, so at the moment I have a website which I made with Bubble.io (no-code), and what I want to do is develop a CRM website with php , what I want to do is connect my database from my Bubble.io website to be able to use the data on my CRM website, Bubble.io

Natural array sorting with proper decimal support in PHP

I want to sort an array with numbers in natural order, so numbers with a bigger value come after smaller ones like this: This is what I get as result, which is not the result I need, decimals are not threated correctly. There is already a similar question Array Sorting in php for decimal values but no fitting…

Can not install php7.4-soap on Debian 9

I am using Debian 9, and I recently upgraded PHP from 5.6 to 7.4. I was hit by the Class ‘SoapClient’ not found error when running an old PHP script, which worked very well under PHP 5.6. The phpinfo() lists “SOAP” module but it doesn’t have a dedicated “soap” section…

How to get object id from array using php mongod

I have a array $document after query findOne() I want get 60d2f531a5476f4eb220402b by use $document[‘_id’]->__toString(); but it never work Answer The stdClass object does not have any methods by default, so you address the $id field like this