Questions tagged as 'php'

1
answer

PHP does not update .txt file data

I am doing an account counter for an application, which is stored in a .txt file. However, the file is always 0. If the file does not exist, it is created, with the value 0 written. However this is never updated whenever the app is viewed...
asked by 26.06.2014 / 16:06
1
answer

preg_replace for preg_replace_callback

How do you transition the function preg_replace to preg_replace_callback in this case? I use arrays because I can add continuation in the future. preg_replace( array( '/(?i)\b((?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\...
asked by 30.06.2014 / 22:59
1
answer

In a repetitive structure are there differences between working with Object or Array?

When I query the database by PHP and want to return that data with while , I usually use fetch_object() , which returns the data in type object . For example: $query = "SELECT * FROM TABELA"; $exect = $conn->query($query);...
asked by 14.12.2015 / 12:03
2
answers

How to run Wamp Server on a network?

I installed Wamp Server on the network, but it does not work. It turns red, move the mouse and it says "Server online". I have already modified the httpd.conf file to release the permission for all hosts and nothing. Follows: # #...
asked by 02.12.2015 / 17:06
1
answer

Laravel + Android

I am starting my studies in the laravel framework and I have seen that it is very useful to create websites, however, is it possible for me to consume these routes in native android? Because the routes are usually linked to views and not to the...
asked by 03.11.2018 / 17:28
1
answer

open a view in new tab

I have a view with a graph, but I do not want it to open inside my template and yes in a new aba . $this->loadGrafico('graficoEscola', $grafico);     
asked by 14.10.2018 / 14:15
1
answer

How to configure Netbeans to work with PHPUnit in a virtualized environment?

I use Netbeans 7.4 on Mac to program. And to not have to install PHP and PHPUnit, I would like to run PHPUnit installed on a virtual machine that has an entire integration environment already configured. This practice has been heavily used, and...
asked by 31.01.2014 / 03:18
1
answer

How to pass an array in the php Query function?

Well, I need to pass two in the php query, but I can not pass them without being as follows: $coluna = implode( ',' , $colunas); $date = implode( " ',' " , $dates); $teste2 = "'$date'"; //O teste2 está gerando algo como: 'exemplo', 'exemplo...
asked by 21.08.2017 / 00:33
1
answer

Failed to load PDF document

I'm working with an office system, where the user will enter the legal number, the person to which the document will be directed and the message, and would like that, if the data were successfully added to the bank, a PDF with the information...
asked by 13.09.2017 / 17:11
1
answer

How can I convert RGB values into pixels for an image in PHP?

for ($j = 0; $j < $altura; $j++) { for ($i = 0; $i < $largura; $i++) { $rgb = imagecolorat($img, $i, $j); $rgb = imagecolorsforindex($img, $rgb); $imagem[$c] = $rgb['red'] + $rgb['green'] + $rgb['blue']; $e = 9; $codig...
asked by 11.09.2017 / 22:08