Clicking the ‘randomize’ button situated above the reference table generates a new table whereby the function descriptions, function syntaxes, and function return values are randomized. The quiz involves matching the function descriptions, function syntaxes, and function return values to the correct function name. Information relating to the randomization of table cells will be displayed for three seconds, before disappearing.
On a desktop computer, table elements are selected by left-clicking the desired table cell and holding the left click in the mouse down position for one second before releasing the left click. The text inside the table cell will turn red to indicate that the one-second mouse left-click has successfully selected a table cell. To then swap the selected table cell with the target table cell, simply repeat the one-second left mouse-click process on the target cell; the table cells will swap position. To de-select a table cell, simply repeat the one-second left mouse-click process on the original table cell.
To select a table element on a touchscreen device (mobile, tablet), simply touch the desired table cell and maintain the touch for one second before removing your finger from the screen. The text inside the table cell will turn red to indicate that the one-second touch has successfully selected a table cell. To then swap the selected table cell with the target table cell, simply repeat the one-second touch process on the target cell; the table cells will swap position. To de-select a table cell, simply repeat the one-second touch process on the original table cell.
Normal touchscreen scrolling behaviour is exhibited by the cells with a light green background; cells without a light green background will not respond to normal touchscreen scrolling. The table is positioned in such a way that the user can also initiate touchscreen scrolling by swiping to the right or left of the table.
When a row consists of the correct function name, function description, function syntax, and function return value, the background colour of the row will change from ‘transparent’ to ‘khaki’; this provides visual feedback that the row is complete.
Once the entire table is complete, a paragraph of feedback will congratulate the user and provide the following information: date and time of quiz commencement; date and time of quiz completion; and the length of time it took the user to complete the quiz.
VIEWPORT OPTIONS:
An example of the layout designed for mobile phonesAn example of the layout designed for tabletsAn example of the layout designed for desktop computers
PURPOSE:
This webpage serves two purposes:
It provides a reference table for the PHP filesystem functions, with information extracted and condensed from w3schools.com, phptutorial.info and php.net.
It enables users to complete a quiz related to the PHP filesystem functions.
USAGE:
For each filesystem function there are four table cells of information: the function name; the function description; the function syntax; and the function return value. There are three layouts available – ‘mobile‘, ‘tablet‘, and ‘desktop‘.
Click the relevant button below to display the PHP filesystem functions reference table, sized appropriately for the desired viewport. A ‘RANDOMIZE‘ button appears above the reference table once the viewport is selected; clicking this button facilitates the commencement of a quiz.
Click the ‘RANDOMIZE‘ button to randomize the functional descriptions, the functional syntaxes, and the functional return information.
FUNCTION NAME
FUNCTION DESCRIPTION
FUNCTION SYNTAX
FUNCTION RETURN VALUE
is_dir()
[is_dir – Tells whether the filename is a directory]
This function determines whether the given filenameis a directory.
is_dir(filename);
[filename specifies the path to the file. If it is a relative filename it will be checked relative to the current working directory. If it is a symbolic or hard link, then the link will be resolved and checked. Further restrictions may apply if you have enabled safe mode or open_basedir.]
is_dir(): returns TRUE if filename exists and is a directory; FALSE otherwise. An E_WARNING is emitted upon failure.
is_executable()
[is_executable – Tells whether the filename is executable]
This function determines whether filenameis executable.
is_executable(filename);
is_executable(): returns TRUE if filename exists and is executable; otherwise FALSE. An E_WARNING is emitted upon failure.
is_file()
[is_file – Tells whether the filename is a regular file]
This function determines whether filenameis a regular file.
is_file(filename);
is_file(): returns TRUE if filename exists and is a regular file; otherwise FALSE. An E_WARNING is emitted upon failure. Some filesystem functions may generate unexpected results for files in excess of 2GB, owing to the fact that PHP’s integer type is signed and many platforms use 32-bit integers.
is_link()
[is_link – Tells whether the filename is a symbolic link]
This function determines whether filenameis a symbolic link.
is_link(filename);
is_link(): returns TRUE if file exists and is a symbolic link; FALSE otherwise. An E_WARNING is emitted upon failure.
is_readable()
[is_readable – Tells whether a file exists and is readable]
This function determines whether a file exists and is readable. PHP may be accessing this file as the user id that the web server runs on; the check is done using the real UID/GID, rather than the effective one. The is_dir() function can be used to distinguish between files and directories.
is_readable(filename);
is_readable(): returns TRUE if the file or directory specified by filename exists and is readable; FALSE otherwise. An E_WARNING is emitted upon failure.
is_uploaded_file()
[is_uploaded_file – Tells whether the file was uploaded via HTTP POST]
This function determines if filenameis a file that has been uploaded via HTTP POST. This function helps to ensure that a malicious user hasn’t tried to trick the script into working on files upon which it shouldn’t be working. For full functionality, is_uploaded_file() needs a correctly-phrased argument such as $_FILES['userfile']['tmp_name'].
is_uploaded_file(filename);
is_uploaded_file(): returns TRUE on success; FALSE on failure.
is_writable()
[is_writable – Tells whether the filename is writable]
This function – an alias of is_writeable() – determines whether filename exists and is writable. filename may also be a directory name, thus enabling you to test whether a given directory is writable.
PHP may be accessing the file as the user id that the web server runs on [often ‘nobody’]; safe mode limitations are not taken into account.
is_writable(filename);
is_writable(): returns TRUE if filename exists and is writable; otherwise FALSE. An E_WARNING is emitted upon failure.
FILL IN FORM AND CLICK SUBMIT TO ADD YOUR STATISTICS TO THE LEADERBOARD:
Forty-year-old father of three wonderful children [William, Seth, and Alyssa]. Works as an Assistant Technical Officer in the Sterile Services Department of Treliske Hospital, Cornwall. Enjoys jogging, web design, learning programming languages, and supporting Arsenal FC. Obtained a BA degree in English from the University of Bolton in 2008, and has continued to gain qualifications in a diverse range of subjects thereafter.