I'm developing a mini framework to use in my applications and auto-load classes like this:
function __autoload($Class) {
$cDir = ['Conn', 'Helpers', 'Models'];
$iDir = null;
foreach ($cDir as $dirName):
if (!$iDir &&a...
I have an application in PHP and a URL of a file. I would like that when the user clicks on any button, cause the browser to trigger the action to download or open the download options window of that file (in the case of Firefox).
The file ca...
What is the correct way to use this function?
1st:
$limite = \abs($resultado_cadastro->limite);
2º:
$limite = abs($resultado_cadastro->limite);
Both work, but netbeans says that the correct one is \abs
Hello,
I have an .js file in link . I would like to call it in another location (mydomain2.com) with <script src="meudominio.com/arquivo.js" ></script> , however, gives file not found. And the name is correct and I can access...
I'm retrieving data from the database that would be "The Indicator of the Indicated", but it catches all up to retrieve all. What I need to do is get only the first 3 results.
And if I tell you how many results I want to get, that is, set thi...
How can I convert database results that are within a field divided by commas, into separate variables independently of the number of results contained in the field.
Example:
I have:
$row['campo'] = 333,444,555,6666
I need:
$var1='33...
With an error on my site, in% of UTF-8
If I use á it will pro link as %E3%83%E2%A1 and printa in input as %e3%83%e2%a1 in hosting.
But in localhost it goes as ã¡ and returns as %c3%a3%c2%a1 .
The...
Good morning Guys, how do I extract the name and last name of a record. However, it should return the first and last name when it has only one last name. My table is like this.
table = 'users'; field1 = 'name';
field2 = 'sobronome';...
I'm studying about passing parameters in PHP. I want, for example, to use a certain method that needs to get two values, I have the following codes:
Example 1
In class :
class Exemplo {
protected $var1, $var2;
publ...
How do I get a div in return of AJAX , for example:
I write in the input a user, and sends the data by AJAX like this:
$("#botao").click(function(){
var xprocesso = $("#segundo").val();
$.post('aquirecebe.php',{...