Questions tagged as 'php'

2
answers

Cronjob with cached file

On my site and using cpanel, I have several cronjobs that run multiple php files. Each of these cronjobs creates a cached file where the site will fetch information. All cronjobs are working fine, but I'm having a problem with one of them. This...
asked by 20.01.2017 / 02:57
1
answer

How to retrieve only 1 URL value with CodeIgniter?

I'm passing two parameters link public function votar($id) { echo $id; die; } And it returns me 4-slug-of-something. I just wanted to retrieve the ID but displaying the two parameters in the url, how do I do that? My route lo...
asked by 24.01.2017 / 14:49
1
answer

How to save data from an HTML page to a file via Javascript?

I do not know anything about this, and an application came up here in the service where I need to get the data from a HTML page, and generate a TXT , or a PDF >, the save will be on the machine itself, because the server is local. I...
asked by 10.10.2017 / 20:48
1
answer

Netbeans + Php7.0 + Apache2 + Debian integration: best practices

I was having trouble enabling apache2 to run .php pages. Then I did the following: I removed the Directory address from the html folder, so the file was: Iremovedthehtmlfolderin/var/www/htmlbecauseNetBeanswhentryingtocreateaprojectin.phpd...
asked by 13.10.2017 / 19:14
3
answers

INSERT with prepare does not work

I'm trying to insert data into the database using mysqli prepare but are not inserting the data, and does not show any error Questions ::: What am I doing wrong in this code below? Is this the best way to do it? Could you put an exam...
asked by 27.05.2017 / 15:16
1
answer

Editing the course settings form

I'm editing the course settings form in moodle and it works, it added the field but not saved, if I change in banco de dados the saved data is printed in input , only it does not save edit_form.php $mform->addEl...
asked by 04.11.2016 / 18:57
1
answer

LEFT JOIN with AND at Eloquent Laravel 5

I have a query with Left Join with AND I am not able to implement this in laravel 5. An excerpt from the query: LEFT JOIN visitante v ON a.codigo = v.id AND v.data BETWEEN '2015-06-01' and '2016-05-31' and v.status = '1' I tried this wa...
asked by 25.11.2016 / 15:38
2
answers

Filter with AJAX + PHP

Within my system, the user logs in, some information fetched from my database is shown, the function that searches the data and how it is listed follows:    Function # função que busca os dados de originação no banco function listaDadosOri...
asked by 08.12.2016 / 17:31
1
answer

Session Codeigniter

I have this normal session: foreach ($nofeatured_prods as $k) { $_SESSION['itens'][$k->id] = $k; } How do I assign in the same way, however, in codeigniter?     
asked by 08.12.2016 / 18:05
1
answer

Is it possible to store the tmp_name of a file in cookies?

I have the following code $allowed = array('png', 'jpg', 'gif','zip'); if(isset($_FILES['upl']) && $_FILES['upl']['error'] == 0){ $extension = pathinfo($_FILES['upl']['name'], PATHINFO_EXTENSION); if(!in_array(st...
asked by 14.12.2016 / 17:30