tmpfile() in PHP
In case you want to create a temporary file, the best way to do it is with the tmpfile() function. This function creates a temporary file with a unique random name in the current d
Read tutorialTHE TUTORIAL LIBRARY
In case you want to create a temporary file, the best way to do it is with the tmpfile() function. This function creates a temporary file with a unique random name in the current d
Read tutorialPHP provides the unlink() function for deleting a file, which "unlinks" the file from a directory. On a UNIX-like system the file will only be deleted if no programs have this file
Read tutorialWhile writing to files that are possibly being read by other scripts at the same time, you will run into problems at some point because a write might not totally be completed while
Read tutorialLet's begin with the basic file-accessing functions. Originally, those functions only worked on normal files, so their names begin with "f," but PHP extends this to almost everythi
Read tutorialBLOB stands for Binary Large OBject and refers to binary data, such as JPEG images stored in the database.
Read tutorialA PHP session allows an application to store information for the current "session," which can be defined as one user being logged in to your application. A session is identified by
Read tutorialOne simple way to maintain data between the different pages in a web application is with cookies. Cookies are sent by PHP through the web server with the setcookie() function and a
Read tutorialThe Crypt_HMAC class implements the algorithm as described in RFC 2104 and can be installed with pear install crypt_hmac.
Read tutorialIf you need to prevent bad guys from tampering with variables passed in the URL (such as for a redirect as shown previously, or for links that pass special parameters to the linked
Read tutorialOne essential technique to protect your web site from users is input validation, which is an impressive term that doesn't mean much at all. The term simply means that you need to c
Read tutorialWhen writing object-oriented code, it is often customary to put each class in its own source file. The advantage of this is that it's much easier to find where a class is placed, a
Read tutorialUnlike most other data types, printing the object's id will usually not be interesting to you. Also, objects often refer to data that should have print semantics—for example, it
Read tutorialOne example today. A better developer tomorrow.