2108 solutions found
Page 4 of 106votes
I want to write some more complex conditions in my Nginx configuration files but I'm not sure of the syntax and can't find docs describing what you can...
votes
In a previous [question][1] I found out that I should be setting nginx ssl termination and not having Rails process encrypted data. Then why does the followi...
votes
I uploaded react.js application to a server. I'm using nginx server. Application is working fine. But when I go to another page & refresh, the site is n...
votes
I'm new to NGINX and I'm trying to setup minimal working thing. So I trying to run aiohttp mini-app with nginx and supervisor (by [this][1] example). Bu...
votes
What is the meaning of `{ }` (curly braces) in string literals in PHP?
votes
Scenario: the size of various files are stored in a database as bytes. What's the best way to format this size info to kilobytes, megabytes and gigabytes? F...
votes
Many of us need to deal with user input, search queries, and situations where the input text can potentially contain profanity or undesirable language. Oftentim...
votes
It seems pretty simple but I can't find a good way to do it. Say in the first page I create a variable $myVariable = "Some text"; And...
votes
I have a question regarding `NULL` in PHP: $a = ''; if($a == NULL) { echo 'is null'; } Why do I see **is nu...
votes
When running a PHPUnit test, I would like to be able to dump output so I can debug one or two things. I have tried the following (similar to the [PHPUnit Man...
votes
Coming from C++ background ;) How can I overload PHP functions? One function definition if there are any arguments, and another if there are no argument...
votes
How to call a JavaScript function from PHP? <?php jsfunction(); // or echo(jsfunction()); // or // Anything e...
votes
I would like to test my application on PHP 5.3 up to PHP 8.2. Where and how can I install the versions and how can I switch them by running a small script?...
votes
I have a website that every time a user logs in or logs out I save it to a text file. My code doesn't work in appending data or creating a text file if i...
votes
I'm not a PHP developer, so I'm wondering what the advantages and disadvantages are in PHP to using explicit getter/setters, in a pure OOP style, with p...
votes
I'm trying to replace multiple spaces with a single space. When I use `ereg_replace`, I get an error about it being deprecated. ereg_replace("[...
votes
I need to determine whether the current invocation of PHP is from the command line (CLI) or from the web server (in my case, Apache with mod_php). Any recomm...
votes
For example, I would like to create an array from the elements in this string: $str = 'red, green, blue ,orange'; I know you can e...
votes
I've written a little function to establish the current site url protocol but I don't have SSL and don't know how to test if it works under https. *...
votes
There are two distinct ways to access methods in PHP, but what's the difference? $response->setParameter('foo', 'bar'); and...