Questions tagged as 'php'

2
answers

Select records smaller than the current date and time

What is the best way to query the database where the data is smaller than the current date and time SELECT * FROM agenda WHERE agendamento < '".date('Y-m-d H:m:s')."'     
asked by 03.08.2017 / 16:07
1
answer

Problems with displaying cookies

I have a Cookie set with the name 68 and value 68, it appears in the cookies settings in the browser, but on pages it works and in others it simply does not exist $id_imovel = (isset($_COOKIE[$id_imovel_form])) ? $_COOKIE[$id_imovel...
asked by 11.09.2016 / 19:53
2
answers

How to run a code without open page in PHP [duplicate]

I have PHP code that uses FSOCKOPEN to check the port of a server, and depending on the response it logs ... But for that the page has to always remain open, I would like to know if it exists some way I'd leave this running automaticall...
asked by 12.09.2016 / 22:31
1
answer

Problem with connection to DB with codeigniter (mysqli) [duplicate]

Well, I've done a registration form for newsletter. And while loading the database in autoload['libraries'] , it displays an error    Call to undefined function mysqli_init () in /home/softlove/public_html/system/database/drivers/mysq...
asked by 07.07.2016 / 13:15
1
answer

Alert only once Session

I would like to know how to make an alert appear only once for the user in the session, in case the user Loga and appears a div with alert informed Logged in successfully, after closing this alert I want it not to appear any more while the sessi...
asked by 03.07.2016 / 07:02
1
answer

Is it recommended to use PHP caching? How to use?

PHP caching is basically a cache created from your site to prevent it from processing data by fetching data for each page request. When a user accesses a page, a copy of it is saved in HTML on the server, this copy is valid at a certain time,...
asked by 11.07.2016 / 05:43
1
answer

Problems with auth :: routes

I am having problem with Auth::routes() I use the framework Laravel in version 5.2 my route file is like this: Route::singularResourceParameters(); Auth::routes(); Route::group(['middleware' => ['cors']], function (){...
asked by 24.10.2016 / 14:47
1
answer

Create unique constraint with two fields in Laravel request

I have in the creation migration of my table the following: public function up() { Schema::connection('database2')->create('empresa_funcoes', function(Blueprint $table) { $table->increments('id'); $tab...
asked by 06.10.2016 / 16:49
2
answers

Paste mysql field dynamically

I created a select command based on information sent by the user, eg: $anoini = $_GET['anoini']; //variavel com ano escolhido pelo usuário $anofim = 2016; //ano final é 2016 $s = 'SELECT pa_proc_id, procedimento, '; //inicio da query while ($...
asked by 04.11.2016 / 19:39
1
answer

Why use __debugInfo ()?

I saw PHP 5.6 now create the new magic method, called __debugInfo . This method is intended to return a array , so it will be printed on the var_dump call. This array returned obviously should provide debugging infor...
asked by 17.11.2016 / 14:51