Questions tagged as 'php'

1
answer

My php system is running on Windows but it is giving UBUNTU error

I'm using PSR-4 auto-load. The error is as follows:    Fatal error: Uncaught Error: Class 'App \ Models \ Bll \ Professor' not   found in /var/www/html/unaprojetos/App/Controllers/Professor.php:12   Stack trace: # 0 /var/www/html/unaprojetos/...
asked by 26.10.2017 / 05:47
2
answers

Count how many months have they "turned" from two dates?

I need to count the number of months that turned from two dates using PHP , I have the following code to calculate the difference of months between 2 dates. $data1 = '2017-01-01'; $data2 = '2017-03-01'; $date = new DateTime($data1);...
asked by 05.09.2017 / 21:03
1
answer

Refresh page when user is away and there are no videos on page

I need to refresh the page of my site when the user is inactive for 15 minutes and when there are no videos embedded in it. If the user is left inactive on a site page for 15 minutes, the page should be updated, but can not update if the page...
asked by 12.09.2017 / 18:28
1
answer

Create array with string in php?

I have a various text and wanted to create an array with the same, is it possible? follows the variable: $texto = "forma=3&banco=100&agencia=200&conta=300&cheque=404"; The output I wish would be: array( 'forma' => '3',...
asked by 30.09.2017 / 21:50
1
answer

Having the layout ready facilitates development with MVC?

I'm learning how to program and study dozens of things at once because programming is my job. What I would like to know is about MVC. I figured that in relation to MVC, the view V should have its HTML ready right at the start of the projec...
asked by 11.10.2015 / 17:25
1
answer

What is the purpose of {} (keys) being used to delimit code in PHP?

In PHP, you can use the keys in any code snippet, for example, to separate blocks aesthetically. Example: { $a = 1; } { class X{} } { { function x() {} } } In these examples, none of them an error is generated. I...
asked by 22.10.2015 / 21:19
1
answer

How to do pagination in CodeIgniter using AJAX?

I'm having a hard time finding a way to do paging using AJAX. I am accustomed to doing it both traditionally and directly with the server using Codeigniter as the application framework . However, this time I need it done without the refresh o...
asked by 24.12.2013 / 12:03
2
answers

How to insert Javascript code in the database?

I'm creating a bbcode function for a blog I'm doing and wanted to know if it's possible (and safe) to insert Javascript codes into my database. I'm working with MySql. Another question, I can not insert single quotation marks (which are...
asked by 09.02.2014 / 16:25
2
answers

Laravel - Route with variable

Good morning Sirs. I have a question about the route in Laravel, I have done searches trying to find the result but I did not find what I wanted. I need that from the id that is redirected (for example: / discipline / 3) it sends the number "...
asked by 17.11.2016 / 06:09
2
answers

PHP json_encode with boolean and decimal values

I have a PHP function that gets data from the database and returns an array with the results. This array by default has all the data as a string , however some fields should be treated as boolean while others should be treated as values (mone...
asked by 07.11.2016 / 16:45