×
Home
Jobs
Tools
Coding Ground
Current Affairs
UPSC Notes
Online Tutors
Whiteboard
Net Meeting
Tutorix
Login
Packages
Categories
Java
JSP
iOS
HTML
Android
Python
C Programming
C++ Programming
C#
PHP
CSS
Javascript
jQuery
SAP
SAP HANA
Data Structure
RDBMS
MySQL
Mathematics
8085 Microprocessor
Operating System
Digital Electronics
Analysis of Algorithms
Mobile Development
Front End
Web Development
Selenium
MongoDB
Computer Network
General Topics
Library
Videos
Q/A
eBooks
Login
Library
Videos
eBooks
Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Selected Reading
UPSC IAS Exams Notes
Developer's Best Practices
Questions and Answers
Effective Resume Writing
HR Interview Questions
Computer Glossary
Who is Who
Malhar Lathkar
has Published
189
Answers
PHP $http_response_header
PHP
Server Side Programming
Programming
Malhar Lathkar
Published on 22-Sep-2020 14:02:55
IntroductionThe superglobal $http_response_header array is populated by HTTP response headers as is the case with get_headers() functions. This array is created in local space of PHP$http_response_headerExample<?php file_get_contents("http://localhost"); $arr=$http_response_header; foreach ($arr as $key=>$val) echo "<p>$key=>$val </p>"; ?>OutputBrowser will display result similar to following0=>HTTP/1.1 302 Found 1=>Date: Tue, 08 Sep 2020 14:49:24 GMT 2=>Server: ...
Read More
PHP $_REQUEST
PHP
Server Side Programming
Programming
Malhar Lathkar
Published on 22-Sep-2020 14:01:14
IntroductionBy default, t he superglobal variable $_REQUEST associative array is collection of contents of $_GET, $_POST and $_COOKIE variables. Settings in php.ini file decide composition of this variable. One of the directives in php.ini is request_order, which decides order in which PHP registers GET, POST and COOKIE variables. The presence and ...
Read More
PHP $_POST
PHP
Server Side Programming
Programming
Malhar Lathkar
Published on 21-Sep-2020 15:48:24
Introduction$_POST is a predefined variable which is an associative array of key-value pairs passed to a URL by HTTP POST method that uses URLEncoded or multipart/form-data content-type in request.$HTTP_POST_VARS also contains the same information, but is not a superglobal, and now been deprecated.Easiest way to send data to server with POST ...
Read More
PHP $_FILES
PHP
Server Side Programming
Programming
Malhar Lathkar
Published on 21-Sep-2020 15:44:14
IntroductionThe global predefined variable $_FILES is an associative array containing items uploaded via HTTP POST method. Uploading a file requires HTTP POST method form with enctype attribute set to multipart/form-data.$HTTP_POST_FILES also contains the same information, but is not a superglobal, and now been deprecatedThe _FILES array contains following properties −$_FILES['file']['name'] - ...
Read More
PHP $_ENV
PHP
Server Side Programming
Programming
Malhar Lathkar
Published on 21-Sep-2020 15:41:50
Introduction$_ENV is another superglobal associative array in PHP. It stores environment variables available to current script. $HTTP_ENV_VARS also contains the same information, but is not a superglobal, and now been deprecated.Environment variables are imported into global namespace. Most of these variables are provided by the shell under which PHP parser ...
Read More
PHP $_COOKIE
PHP
Server Side Programming
Programming
Malhar Lathkar
Published on 21-Sep-2020 15:40:35
IntroductionThe superglobal $_COOKIE stores variables passed to current script along with HTTP request in the form of cookies.$HTTP_COOKIE_VARS also contains the same information, but is not a superglobal, and now been deprecated.What is a cookie?Cookies are text files stored by a server on the client computer and they are kept of ...
Read More
PHP $argv
PHP
Server Side Programming
Programming
Malhar Lathkar
Published on 21-Sep-2020 15:38:59
IntroductionWhen a PHP script is run from command line, $argv superglobal array contains arguments passed to it. First element in array $argv[0] is always the name of script. This variable is not available if register_argc_argv directive in php.ini is disabled.$argvFollowing script is executed from command line.Example Live Demo<?php var_dump($argv); ?>Outputarray(1) { ...
Read More
PHP $argc
PHP
Server Side Programming
Programming
Malhar Lathkar
Published on 21-Sep-2020 15:37:38
IntroductionThis superglobal variable is available when a PHP script is run from command line (and not when executed from HTTP server's document root). It is an integer that corresponds to number of command line arguments passed to current script. As script's filename has to be entered in command line, minimumn ...
Read More
PHP WeakReference class
PHP
Server Side Programming
Programming
Malhar Lathkar
Published on 21-Sep-2020 15:36:03
IntroductionWith Weak references, it is possible to retain a reference to an object which does not prevent the object from being destroyed. Implementing cache like structures can be done by Weak reference.A weak reference is similar to a normal reference, except that it doesn’t prevent the garbage collector from collecting ...
Read More
PHP Traversable interface
PHP
Server Side Programming
Programming
Malhar Lathkar
Published on 21-Sep-2020 15:34:13
IntroductionTraversable is an abstract interface, hence it can not be directly implemented by any class. Generally, Iterator or IteratorAggregate interfaces, which extend Traversable, are used to check if implementing class is traversable using foreach construct in PHP.Certain built-in classes that implement this interface can be used in foreach and need ...
Read More
Previous
1
2
3
4
5
6
7
...
19
Next
Advertisements
Print
Add Notes
Bookmark this page
Report Error
Suggestions
Save
Close
Dashboard
Logout