Questions tagged as 'php'

0
answers

Dependency Injection Composition and Injection [closed]

I was studying Design Patterns and came up with a question: Does the Concept Composition (OOP) inflict on the pattern "Injection Dependency"?     
asked by 09.10.2015 / 18:54
0
answers

How to correct this PHP code in Raspbian (Raspberry Pi 2)?

I'm creating 2 monitoring projects here in the company with 2 monitoring pages that will use PHP and HTML and will run on Raspberry Pi 2 (Raspbian) board. The code is very simple, I can open it normally in Windows, but in Raspbian is occurring a...
asked by 17.02.2016 / 19:30
1
answer

Countdown on PLACEHOLDER is it possible?

I would like to know first if this is possible, and also disable the input where the placeholder is until the countdown ends and when the countdown finishes enabling again? some sketch? jquery and the right one?     
asked by 06.02.2016 / 00:55
1
answer

PHP + Jquery + JSON

I have function calling an ajax. As below: function verifica(){ var meuid = $('.meuid').attr('id'); var datas = "user="+meuid; $.ajax({ type: "GET", url: 'sys/stream2.php',...
asked by 09.02.2016 / 01:53
1
answer

PHP Mysql - duplicate return

Well, my question is: How can I be checking to see if there is already such a value in the database? I have this code here that is already done the verification by the same SQL Query, that is if there is no such value it inserted and if it ex...
asked by 08.02.2016 / 18:15
1
answer

Sector questionnaire in php mysql

Here I see how many questions you have in each industry: SELECT a.area_id AS ID_AREA, a.area_desc AS AREA_DESC, count(sb.sub_area_cod) AS TOTAL FROM relacaoperg AS rp INNER JOIN area AS a ON rp.id_a...
asked by 16.02.2016 / 11:31
1
answer

Nginx, prioritize folders instead of "location /"

I use PHP with the Phalcon framework in my projects and this is the framework. Mynginxlookslikethis:server{listen80;server_name123.123.123.123;root/var/www/meusite.com.br;location@site{rewrite^/public(.+)$/public/index.php?_url=$1last;}locat...
asked by 06.12.2015 / 15:37
0
answers

PHP PDO connection with static variable in class

I did a search on connections using singleton in the PDO, most people use a private or protected construct so that if there is no connection the same is created when instantiating a new Class (), but I wrote the code snippet using functions stat...
asked by 07.03.2016 / 21:06
1
answer

Handle the JSON data coming from a request from the jQuery datepicker with ajax

I need to create a schedule. I have a datepicker and a fixed table next to it with schedules that start from 08:00 am until 19:00 pm and when I click on a datepicker day it returns all the queries from that day in the table to side in their resp...
asked by 11.12.2015 / 18:57
1
answer

doubts about clean URL without mod_rewrite

I have a small project to do in the next few days and my client has a cheap, shared hosting that does not allow me to change apache settings and is not mod_rewrite enabled. I would like to find another way to keep URLs friendly and I'm thinking...
asked by 09.12.2015 / 15:44