Posts by Gregorio bonfante • 166 points
6 posts
-
0
votes2
answers1160
viewsA: How to develop a private Restfull API?
Unfortunately I will say, regardless of the solution what you want is not possible, at one point or another the same can be broken, simulated or emulated. Asymmetric or symmetric key does not change…
-
1
votes1
answer948
viewsA: PHP Upload files to a directory created with mkdir
Good looking over rewrote part of the code. <?php $vregistro = utf8_decode($_POST['f_registro']); //Guarda um nome digitado pelo usuário que será o nome da pasta criada $diretorioBase =…
-
3
votes2
answers753
viewsA: Count the amount of months you "Turned" from two dates?
The problem is that the interval shows the time between the dates, I believe that for the desired result, I should manually calculate the difference in months, so we have: <?php $data1text =…
phpanswered Gregorio bonfante 166 -
2
votes1
answer41
viewsA: Cut out a whole number, any way to do it?
PHP is not strongly typed $IdUF = substr($rowData['IdMunicipio'],0,2) returns a string but case $IdUF is used in an operation as sum its value will be converted so if: <?php $IdUF =…
phpanswered Gregorio bonfante 166 -
0
votes3
answers939
viewsA: Javascript set value in Modal Bootstrap
I will answer more how to debug. In my view your code is functional, then the problem is elsewhere. that not in the code snippet you made available. Use the browser console and run the lines one by…
-
1
votes3
answers2116
viewsA: How to rewrite a URL?
What you seek is a Front controller. For such a solution in PHP you need something a little more elaborate, I recommend using a framework like Symfony or derivatives. In case you insist on doing it…
htaccessanswered Gregorio bonfante 166