Questions tagged as 'php'

1
answer

What is the difference between pg_query and pg_execute?

I'm new to Postgre and I see pg_query and pg_execute in the application I'm working on, but I can not see any difference between the two. I have to do an insert and I'm not sure which one to use. What is the difference between t...
asked by 27.08.2014 / 17:57
3
answers

Send email with CCO in PHP

I wanted to know how to send email with CCO ("with hidden copy")? Formula Code: require('config.php'); $sqlstt = "SELECT * FROM tb_site WHERE id='1'"; $resultstt = mysql_query($sqlstt); $rowtt = mysql_fetch_array($resultstt); $site...
asked by 16.07.2014 / 22:33
5
answers

How to detect the page encoding with PHP?

I wanted to create a function that would save the data in the database always in the correct encoding (my bank is UTF-8) according to the detected encoding . Is there any native PHP function to do this? Is there any other way?     
asked by 19.12.2013 / 12:57
2
answers

How to use database in CakePHP without complying with the naming conventions?

CakePHP has conventions for naming tables, classes, etc., such as having the username and password columns for tables that hold users. In my current situation, I have tables that do not meet these standards. How could I continue to us...
asked by 13.01.2014 / 15:17
2
answers

How to use a variable contained in another PHP page?

Well, good afternoon. How do I use a variable from an X.php file on the Y.php page? I want to do, for example, the following: <?php $Frase = "minha frase"; ?> On my Y page I want to get the value of one of these variables, eg: &l...
asked by 16.11.2015 / 17:19
3
answers

Error: Mcrypt required in Laravel 4

I made a new installation of Laravel 4. I have all the system requirements are correct. However, when I try to use artisan to run the key:generate command, to configure my APP, I can not. It returns me the following error:    Mc...
asked by 07.01.2014 / 19:48
1
answer

XML documentation

I develop a framework in PHP and would not like to comment on the code of the framework directly in the classes, for several reasons. So I would like to know if there is an editor that reads the documentation from an XML or something similar,...
asked by 13.08.2014 / 02:44
1
answer

Netbeans project with git and Composer repository

I'm developing a PHP project that requires two separate libraries. I am required to use NETBEANS. To develop the three separately but at the same time and because the main project "MAIN PROJECT" needs the other two, I have idealized: All...
asked by 06.03.2015 / 16:55
5
answers

str_split does not work well in UTF-8 containing string?

I want to iterate a string with foreach . For this, I learned that I should use the str_split function, which separates each character from the string into a array . But this operation does not work as expected when using str...
asked by 01.02.2016 / 19:50
3
answers

Is there an application security vulnerability when using AJAX?

I'm a HTML/CSS/PHP programmer for a few years and incredible and impossible to look at, I'm just entering the Javascript world with jQuery and AJAX now. My question is whether the security level is affected when we pass para...
asked by 30.08.2014 / 22:06