Questions tagged as 'php'

1
answer

Check if array is associative in a class

I have a class in which I need to do certain checks on an array, such as checking whether it is associative or indexed. I know there is no native function in PHP that does this, so I could use the example below. function isAssoc($arr) { re...
asked by 31.10.2015 / 22:50
1
answer

Execute modal only if there is a call

I want to execute the modal only if the call exists. Because it's taking too long to open the page. Below is the modal used: <div class="modal fade" id="m_modal<?php echo $count ?>" tabindex="-1" role="dialog" aria-labelledby="...
asked by 03.06.2018 / 21:00
1
answer

Submit when typing in the input type text for the php code on the same page

Would you have some form of typing in the form sending the data to the PHP code without having to press submit simply by typing in the text input? <form method="POST" action=""> <label>nome: </label> <input type...
asked by 07.06.2018 / 20:35
1
answer

How to make an extract inside a function without the variables colliding with the parameter variables?

I have a function that loads a given path with through include . The parameters of this function are $file and $data . The parameter file is the name of the file that will be loaded with include within the function, and...
asked by 14.12.2015 / 14:59
1
answer

How do I create a variable to display error or success message? [closed]

How do I display error messages in a variable, for example: You have run the code all right, there you have the first message: if($count==1) { // PRIMEIRA MENSAGEM $change_profile_msg[] = "<div class='al...
asked by 19.12.2015 / 19:06
1
answer

Google Maps API Return markers with JSON, as it moves the map or zoom

points.php returns a Json with map markers [ { "Id": 1, "Latitude": -19.212355602107472, "Longitude": -44.20234468749999, "Descricao": "Conteúdo do InfoBox 1" }, { "Id": 2, "Latitude"...
asked by 29.12.2015 / 23:35
2
answers

Is there a paid localhost server? [closed]

I searched the internet and found nothing related. I want to set up a localhost server to test my applications. I have already tested Xampp, Wampserver EasyPHP and others ... Is there a paid system? The correct way to speak is "Local...
asked by 30.12.2015 / 13:22
1
answer

Block access to a URL or system folder path

Hi, I'm trying to block administrative access from my site and release it for only a few ips. I can do this using the .htacess well quiet but the problem is that I have the adminstrative module and the module frontend and .htaccess...
asked by 21.12.2015 / 12:10
1
answer

Put header in ajax get method

Good afternoon, I have the following piece of code: function getData(){ var url = "http://teste.com"; var data = ""; $.get(url, function(response){ serverResponse = response; for(i in response.content){...
asked by 15.12.2015 / 17:18
1
answer

How to apply the_content filter in function get_the_content WordPress?

I'm developing a theme for WordPress, for hobby and for studying a little PHP, JavaScript etc. and I'm having a little problem. I'm working with the controller concept where all logic will be processed and then sent to a view. To make it clea...
asked by 11.10.2016 / 23:52