Questions tagged as 'php'

1
answer

What are the valid delimiters for preg_ regular expressions?

What are the valid delimiters for regular expressions preg_* ? I know we can use some of these ( / , ~ and # ), as I show in the example below: $numero = '0.12.13'; preg_replace('/\D+/', '', $numero); // string('012...
asked by 28.08.2015 / 14:13
1
answer

Extract PDF information through position using PHP

Can you extract the information according to the position in the PDF (x, y coordinate) in PHP? I have seen that it is possible to do this in C # using the PdfReader class.     
asked by 21.08.2015 / 18:37
1
answer

Block existing email in jquery.validate

I have a registration form that uses the jquery.validate.js link plugin. I researched but did not find a way to return an error when the client inserts an already valid email. What is the best alternative to solve my problem? Thanks in advance...
asked by 27.08.2015 / 15:50
1
answer

Exporting my database to CSV with PHP

I created a code in php that performs a twitter search and saves the result (100 tweets) to a database. In this code, I also have the option to select all tweets from the database and export them to a csv file. However, if the tweet has a lin...
asked by 27.08.2015 / 22:11
3
answers

Json PHP and Mysql

I'm working on a personal project with an open database, and I need a JSON file from a MYSQL query, I've been trying to solve this problem for a few days now and I'm having a hard time getting the name of the My data. Example: I make a query to...
asked by 29.09.2016 / 01:45
2
answers

Error 'Class' MongoDB \ Driver \ Manager' not found "

At the time of using MongoDB , together with Laravel it returns the following error:    FatalErrorException in Client.php line 61:   Class 'MongoDB \ Driver \ Manager' not found     
asked by 05.10.2016 / 16:53
2
answers

PHP - Foreach self-tuning

During development, there are many times when a request is made to the database, in which the returned data comes in array, sometimes it is necessary to perform a foreach to adjust this data or even include more data of according to a spe...
asked by 18.09.2015 / 19:24
1
answer

Error when using bindParam: Only variables should be passed by reference

I'm getting an error when I use the PDP bindParam , code: ConnectionPDO Class: function __construct($dsn, $username = NULL, $password = NULL, $options = NULL) { parent::__construct($dsn, $username, $password, $options); $this->Loa...
asked by 22.09.2015 / 23:48
1
answer

Self invoking functions in PHP 7. What are the advantages?

I know that in javascript it is very useful to use self invoking functions , especially when it comes to variable scope protection. I was doing tests on PHP 7 and I see that we have the same possibility of using Self In...
asked by 16.09.2015 / 17:41
2
answers

Friendly URL changing file link

I have the following friendly url RewriteRule ^noticias/([0-9]+)/?$ inicio.php?pg=noticias&id=$1 But when I access mysite.com/news/14 It changes the links of the files to noticias/css/principal.css where the original is /css/p...
asked by 21.10.2015 / 05:46