PHP $_SERVER[‘HTTP_HOST’] vs. $_SERVER[‘SERVER_NAME’], am I understanding the man pages correctly?
I did a lot of searching and also read the PHP $_SERVER docs. Do I have this right regarding which to use for … Read more
I did a lot of searching and also read the PHP $_SERVER docs. Do I have this right regarding which to use for … Read more
In PDO, a connection can be made persistent using the PDO::ATTR_PERSISTENT attribute. According to the php manual – Persistent connections are not closed … Read more
This question looks embarrassingly simple, but I haven’t been able to find an answer. What is the PHP equivalent to the following C# … Read more
I need to loop lot of arrays in different ways and display it in a page. The arrays are generated by a module … Read more
I am installing a website in a droplet (Digital Ocean). I have a issue for install NGINX with PHP properly. I did a … Read more
I have code something like this: <? $a=”localhost”; function body(){ global $a; echo $a; } function head(){ global $a; echo $a; } function … Read more
How are callbacks written in PHP? 9 Answers 9
Is there a way in PHP to include a constant in a string without concatenating? define(‘MY_CONSTANT’, 42); echo “This is my constant: MY_CONSTANT”; … Read more
What I want is get an object from an API with a HTTP (eg, jQuery’s AJAX) request to an external api. How do … Read more
I’d like (just to test some functions, after I’ll avoid this behaviour) to load the page called by submit on a new tab … Read more