Questions tagged as 'php'

2
answers

Which way to save images to a server?

I know the answer to this question is not accurate, but I am asking because of the alerts I received from a client hosting (DV medium) The system I developed saves the images as follows: /uploads/nome-do-modulo/ano/mes/dai/nome-imagem-encrip...
asked by 07.07.2015 / 14:16
2
answers

Break txt file into blocks, and each block in lines

I have an "active.txt" file where you can find information blocks Ex: SACOLAO CENTER R RUA PAULINO MENDES LIMA,31 CENTRO...
asked by 10.07.2015 / 17:50
1
answer

How to check if a file containing a specific word exists?

I'm using PHP, and in a server folder it contains files with these names: T3497012@16-01-02:21@[email protected] T3497012@16-01-02:22@[email protected] T3497012@16-01-02:23@[email protected] T3497012@16-01-02...
asked by 16.01.2018 / 20:27
2
answers

"date (): It is not safe to rely on the system's timezone settings ..."

I took a system to perform maintenance, and when migrating to another server, started to give an error in an input with the current date, eg. <input type='text' value='<?php echo date("d/m/Y"); ?>'> But you are giving the follow...
asked by 11.01.2018 / 14:02
4
answers

Input type datetime error

Good afternoon, I have a problem that I can not solve, I wanted to change the format of my form to "datetime", but when I test in my browser it appears as if it were text. <div class="form-group"> <label>Data de requisicao</...
asked by 30.01.2018 / 18:49
3
answers

Print page with Background

I'm working on creating and printing reports with PHP, where a webpage is generated with the content of the report. I would like to put the watermark "CANCELED" when a report is canceled. For that, I'm using an image as a background, but the ima...
asked by 17.01.2018 / 13:17
2
answers

problems when deleting unlink file ()

I would like to delete a file in the file, and nothing is going well from the following error Strict standards: Only variables should be passed by reference could you guide me to solve this error? I'll be thankful! Image Link: <a id="photo-...
asked by 24.09.2015 / 22:30
1
answer

How to list files in PHP with a specific name?

Good Morning I have the code below. <?php $diretorio = "../../arquivos/nest"; $ponteiro = opendir($diretorio); while ($nome_itens = readdir($ponteiro)) { $itens[] = $nome_itens; } sort($itens); foreach ($itens as $listar) { if ($lista...
asked by 09.03.2017 / 12:54
1
answer

INNER JOIN with equal columns conflict

In this SELECT JOIN , all tables have columns with the same name. With this, it gives a conflict at the time of listing. Example: column Id_saida it is in all tables. How to list each one? $cmd = "SELECT f.*,a.*,e.*,p.*,m.*,v.*...
asked by 28.08.2015 / 17:25
3
answers

In PHP, what is the best way to print a variable through a function?

Let's say I have the following function: private function teste() { return 'teste'; } For me to print on the screen, I could simply use: echo $this->teste(); But in some cases I see that they first assign to a variable and only...
asked by 08.09.2015 / 04:55