Questions tagged as 'php'

1
answer

How to deserialize symfony 3 a json to entity

I have the following entity: class Alumno { /** * @var int * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var string * * @ORM\Col...
asked by 12.12.2018 / 17:09
1
answer

How to make a dynamic selection in laravel 5.7 laravel collective?

Veran I have a registration form to my table Inmueble , and one of the fields is its location, the ubicacion is also a table in my database, the fields in the table ubicacion are id and nombre , I need that the s...
asked by 12.12.2018 / 17:51
1
answer

How to print an arrangement with a foreach in CODEIGNITER?

In the DB model , the query is fine, in the Controller the information is sent correctly to the view but in the View not I know how to print the matrix in a foreach. The only way to print the arrangement is with the following: <?php...
asked by 12.12.2018 / 16:35
1
answer

How to receive text, files by the put method in laravel 5.6 (api restFULL)

I am developing APIS with laravel 5.6, I have a driver that receives images and text, by post everything works normally for me here I leave the code js JS function registraPET(){ var datos = new FormData();...
asked by 12.12.2018 / 18:03
0
answers

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

I've been looking for the solution to this error everywhere, but no. I would need your help to be able to continue with the project. Here's the php and js. PHP: <?php $accion = $_POST['accion']; $password= $_POST['passw...
asked by 10.12.2018 / 18:10
0
answers

Gettext does not translate the strings

I'm trying to implement translations with gettext but I can not translate anything. My project has the structure: Project: index.php locale en_GB LC_MESSAGES en_GB (.po and .mo) I have looked in my php.ini that...
asked by 10.12.2018 / 16:59
2
answers

truncate decimal

* I WANT TO ROUND A NUMBER, BUT I WANT TO PUT A CONDITION * Math.Truncate(6.847457) //resultado 6 * But this truncates all the numbers I just want to truncate the 5 and the others if you round them *     
asked by 07.12.2018 / 16:22
0
answers

Pass JSON-Ajax variable to PHP variable

I need to pass an array / JSON / Ajax variable to a PHP variable, so that I can manage it in my file. I currently have this in index.php: <script type="text/javascript"> $("#enviar").click(function(e) { e.preventDefault(); var...
asked by 10.12.2018 / 17:16
0
answers

Fatal error: Constant expression contains invalid operations in C: \ xampp \ htdocs \ test \ php_tests \ app \ controller \ auth \ Token.php on line 18

   Fatal error: Constant expression contains invalid operations in   C: \ xampp \ htdocs \ test \ php_tests \ app \ controller \ auth \ Token.php on   line 18 protected $token = [ 'csrf' => random_int(0, 500) // line 18 ];...
asked by 10.12.2018 / 16:44
1
answer

Concatenate data and insert in a field

I have part of this code php , where you are doing insert to the table inventory_list , but what I need is that it depends on that you have selected in fkCategory , fkLocation and fkSubCat that refer to...
asked by 13.12.2018 / 18:00