Posts by gpupo • 2,181 points
62 posts
-
3
votes1
answer147
viewsA: Always keep the same name as a PDF file on upload
Very simple. Just you set $arquivo_nome as documento.pdf. $arquivo = $_FILES["arquivo_pdf"]; $arquivo_nome = 'documento.pdf'; // Move o arquivo para o diretório especificado set_time_limit(0);…
-
3
votes2
answers476
viewsA: Doubt with method visibility and property in PHP
Using underline before a method or variable is not a general rule, but rather a writing convention that is adopted in a project. We used to see many projects with this writing mode, but nowadays I…
-
0
votes2
answers987
viewsA: Large database text or just a path to a txt(Mysql) file
If it is a good practice it will depend on the structure of its application, for example, if you need to search for content within these texts, which will be complicated for you to do, only with the…
-
5
votes6
answers2856
viewsA: Can not use "{ }" IF keys in PHP cause problems?
Despite executing,(IF without keys can only be used for executing a command) you will have a writing and organization problem, so it is recommended that you follow what has been decided on PSR-2:…
-
0
votes3
answers7027
viewsA: Match php variable to javascript variable
This is not possible. You could have javascript request an AJAX that would save the value in the session, and in the next execution you would have this value. Gambiarra alert!…
-
1
votes1
answer104
viewsA: Doubt about how to share information
It looks better if you use Services and also the Knpmenubundle and each of your Bundles can make contributions to setting up the Bundle context at each run. Behold Creating Menus as Services…
-
11
votes1
answer19909
viewsA: What are the advantages and disadvantages between Apache and Nginx?
I believe that the experience in the use of each of these servers is fundamental. Any of them can easily be "bogged down" by Addons and soon lose performance, as well, especially Apache, can be…
-
1
votes2
answers795
viewsA: PHP Cookie is not set on remote server
In his setcookie you can identify the path and also the domain, so that the cookie can be stored and also read by your server. Maybe that’s your problem. path The path on the server where the cookie…
-
2
votes3
answers4401
viewsA: How to break lines when sending an email?
If you’re using plain text messaging, can use the following: //... $msg = __( 'Você foi registrado com sucesso!', 'commentator' ) . "\n" . __( 'Seus dados:', 'commentator' ) . "\n" .__( 'Usuário:',…
-
1
votes1
answer3063
viewsA: How to install Ode.js in shared hosting (Cpanel)?
I don’t recommend it, but you can follow this tutorial. ./configure --prefix=/home/seu_user_name…
-
1
votes2
answers459
viewsA: Creating Logs page
Although @Sileno Brito’s response is pretty cool, I’m a fan of the Monolog where you can inform email, ip, sucess as part of context and the datetime is already generated by the same component, and…
-
6
votes1
answer9453
viewsA: How do I "link" an already purchased domain to an Amazon Ec2 site?
You can use the Route 53 of AWS by entering the nameservers provided by this service there in your domain configuration. Then, in the DNS configuration within Route 53, point out the services you…