Questions tagged as 'php'

1
answer

Transform query from MySQL to Codeigniter

I have this query in MySQL: select p.id_empleado as id,(select 'empleado') as tipo, p.url_imagen, concat_ws(' ',p.nombre,p.paterno,p.materno) as nombre, e.nombre as empresa,concat_ws(' ',u.nombre,u.apellidos) as solicitante, p.fecha_al...
asked by 30.08.2018 / 18:50
1
answer

I upload PDF files by POST but $ _FILES type does not detect them as such

Good, I have a form in which I upload a .PDF file. The problem is that sometimes, if it detects PDFs and other times with other files with the same ending, it indicates that they are not of that type. What could I do? I leave here an extract of...
asked by 10.01.2017 / 14:32
1
answer

Use of quotes or single quote in laravel

I have a question regarding the use of quotes in laravel to explain I put a snippet of code. public function index(Request $request){ $query=trim($reques->('serchText')); $categorias=DB::table('categoria') ->where('nombre','LIKE','...
asked by 02.10.2016 / 06:37
2
answers

Contact Form with reCaptcha

I have a contact form and I want to implement reCaptcha but the truth is that I have not been able to, I have tried but I can not get my PHP code to validate that the Captcha is not resolved and does not allow sending the form. Then my PHP and H...
asked by 30.05.2017 / 23:27
2
answers

Problems with the require_once () path in php

I have the following inconvenience that I am finding it hard to decipher. I have the files distributed as follows: / |___control | |___usuarios.php |___vista |___addUser.php |___modelo | |___conexion.php |___index.php Pass the...
asked by 05.06.2017 / 04:49
1
answer

Integrate Bootstrap in Laravel 5.4

I'm starting with Laravel and I'm having trouble linking routes with Bootsrap <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge">...
asked by 30.03.2017 / 00:04
2
answers

Is it safe to give 777 permissions to the folder where I have my PHP web project?

I want to give full permissions to my lampp folder, where I have my php installed. What I did was: sudo chmod -R 777 /opt/lampp Currently I do not have another because I can not generate a document with php using its function fopen()...
asked by 20.10.2017 / 21:13
2
answers

Obtain data of an object in Laravel

I know it's not the way to ask, but I'm starting in Laravel and they sent me an exercise in class and I do not know how to continue. They ask me to show a student (indicating their id), I have created the table and the model with artisan, I have...
asked by 27.01.2018 / 13:18
1
answer

Protect files with sensitive data in PHP

In PHP we can use files to store sensitive data, but those files must have certain levels of protection. We are going to take the example of a file that stores our login credentials to the database. To save this important information I hav...
asked by 07.11.2017 / 00:46
1
answer

Fatal error: Call to undefined function swal () - PHP

I want to add an alert message of the SweetAlert class but when everything is correct and I want to show the message / popup it tells me the following error:    Fatal error: Call to undefined function swal () Using the page link I hav...
asked by 03.01.2018 / 14:06