Posts by Lucas Ferreira • 166 points
6 posts
-
1
votes1
answer88
viewsA: Check if date and time/minute has already expired
Friend, Check the Timezone of your online server, in some cases before doing anything in PHP, you should set your Timezone so that from now on your PHP will only work with exact date and time, for…
-
1
votes4
answers765
viewsA: Numeric sequence loop in PHP
Friend, You can do something in this line of code below, which I launch commented: <?php $numeros = array("01", "03", "04", "06", "11"); // que vieram do banco // criamos uma função para…
-
2
votes1
answer61
viewsA: How to change the value of a custom attribute?
Your code should work correctly, so if you give a console.log right after the attribute change will notice that the value has been changed in Runtime. $("#botao-01").click(function() {…
-
0
votes2
answers59
viewsA: Create expressions in strings
Friend, Since you use it const then you can do something like this: const str = `Eu sou ${1 + 1 === 2 ? 'um dois' : 'nao sou'}!`; In other more advanced cases I recommend you use some template…
-
6
votes1
answer2094
viewsA: Send files via FTP with PHP
You can test enable passive mode on FTP: ftp_pasv($conn_id, true); Before starting the ftp_put: ftp_pasv($conn_id, true); // habilitar o modo passivo do FTP... ftp_put($conn_id, $remote_file_path,…
-
2
votes5
answers4348
viewsA: How to access the value of an array through the key?
Following the idea of @Gabriel Katamura, we have how to create this function: function getArrValue(arr, m) { var filteredArr = arr.find(function(v){ return (m in v); }); return (!!filteredArr) ?…