Tag: io

58 votes
30 answers
1.4K views
var functionName = function() {} vs function functionName() {}

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding featu

avatar
Arline
0 1 0 9
asked 07 September, 2021
62 votes
30 answers
1.9K views
58 votes
29 answers
2.8K views
How do I get a file extension in PHP?

This is a question you can read everywhere on the web with various answers: $ext = end(explode('.',

avatar
Gigi
0 1 0 9
asked 07 September, 2021
67 votes
30 answers
2K views
How do I convert a string to a number in PHP?

I want to convert these types of values, '3', '2.34', '0.234343', etc. to a numb

avatar
Corrin
0 1 0 9
asked 07 September, 2021
59 votes
17 answers
361 views
How do I expire a PHP session after 30 minutes?

I need to keep a session alive for 30 minutes and then destroy it.

avatar
Hildegard
0 1 0 9
asked 07 September, 2021
55 votes
18 answers
3.1K views
How can I sanitize user input with PHP?

Is there a catchall function somewhere that works well for sanitizing user input for SQL injection and XSS att

avatar
Trudy
0 1 0 9
asked 07 September, 2021
66 votes
14 answers
2.5K views
Secure hash and salt for PHP passwords

It is currently said that MD5 is partially unsafe. Taking this into consideration, I'd like to know which

avatar
User demo
0 1 0 9
asked 07 September, 2021
62 votes
30 answers
1.6K views
Enumerations on PHP

I know that PHP doesn't yet have native Enumerations. But I have become accustomed to them from the Java

avatar
Jefferey
0 1 0 9
asked 07 September, 2021
58 votes
14 answers
2.2K views
How to Sort a Multi-dimensional Array by Value

How can I sort this array by the value of the "order" key? Even though the values are currently sequential, th

avatar
Nereida
0 1 0 9
asked 07 September, 2021
52 votes
11 answers
2.1K views
How do you use bcrypt for hashing passwords in PHP?

Every now and then I hear the advice "Use bcrypt for storing passwords in PHP, bcrypt rules". But what is bcr

avatar
Alphonso
0 1 0 9
asked 07 September, 2021
69 votes
7 answers
1.9K views
How does PHP 'foreach' actually work?

Let me prefix this by saying that I know what foreach is, does and how to use it. This question concerns how i

avatar
Leonardo
0 1 0 9
asked 07 September, 2021
53 votes
28 answers
1.1K views
62 votes
13 answers
2.4K views
PHP | "The requested PHP extension bcmath is missing from your system."

Greetings fellow developers, I am trying to use composer for a PHP project of mine on a development server I

avatar
Alphonso
0 1 0 9
asked 07 September, 2021
52 votes
5 answers
2.6K views
How can a web server handle multiple user's incoming requests at a time on a single port (80)?

How does a web server handle multiple incoming requests at the same time on a single port(80)? Example : At t

avatar
Trudy
0 1 0 9
asked 07 September, 2021
56 votes
10 answers
1.2K views
Using CRON jobs to visit url?

I have a web application that has to perform a repeated tasks, Sending messages and alerts, I, already, use a

avatar
Xavier
0 1 0 9
asked 07 September, 2021
56 votes
4 answers
446 views
Golang production web application configuration

For those of you running Go backends in production: What is your stack / configuration for running a Go web a

avatar
Hildegard
0 1 0 9
asked 07 September, 2021
60 votes
10 answers
715 views
How do I detect if a user is already logged in Firebase?

I'm using the firebase node api in my javascript files for Google login. firebase.initializeApp(config)

avatar
Nereida
0 1 0 9
asked 07 September, 2021
55 votes
7 answers
973 views
Chmod 777 to a folder and all contents

I have a web directory /www and a folder in that directory called store. Within store are several f

avatar
Chelsea
0 1 0 9
asked 07 September, 2021