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
lchgrp()
[lchgrp – Changes group ownership of symlink]
This function attempts to change the group of the symlink filename to group. Only the superuser may change the symlink group arbitrarily; other users may change the symlink group to any group of which they are a member.
lchgroup(filename, group);
lchgrp(): returns TRUE on success; FALSE on failure. This function is not implemented on Windows platforms. When safe mode is enabled, PHP checks whether the files or directories being operated on have the same UID as the script that is being executed.
lchown()
[lchown – Changes user ownership of symlink]
This function attempts to change the owner of the symlink filename to user user. Only the superuser may change the owner of a symlink.
lchown(filename, user);
lchown(): returns TRUE on success; FALSE on failure. As with lchgrp(), this function is not implemented on Windows; similarly, PHP checks for a match between the UID of filename and the UID of the currently-executing script when safe mode is enabled.
link()
[link – Create a hard link]
This function attempts to create a hard link between target and link.
link(target, link);
link(): returns TRUE on success; FALSE on failure. On Windows systems, this function requires PHP to run in an elevated mode or with the UAC disabled.
linkinfo()
[linkinfo – Gets information about a link]
This function collects information about a link. It is used to verify that a link – pointed to by path – really exists [using the same method as the S_ISLNK macro defined in stat.h].
linkinfo(path);
linkinfo(): returns the st_dev field of the Unix C stat structure returned by the lstat() system call. Returns -1 [per http://man7.org/linux/man-pages/man2/stat.2.html] or FALSE in case of error.
lstat()
[lstat – Gives information about a file or symbolic link]
This function collects the statistics pertaining to the file or symbolic link referenced by filename.
lstat(filename);
lstat(): returns an array structured as outlined above in relation to fstat(), relating to the file or symbolic link referenced by filename.
mkdir()
[mkdir – Makes directory]
This function attempts to create [‘make’] the directory specified by pathname. When safe mode is enabled, PHP checks that the directory in which the script is operating has the same UID as the currently-executing script.
mkdir(pathname, mode[optional parameter with a default value of 0777], recursive[optional parameter, with a default value of FALSE], context[optional parameter]);
[mode is ignored on Windows. recursive allows the creation of nested directories specified in pathname.]
mkdir(): returns TRUE on success; FALSE on failure. An E_WARNING is emitted if 1.) the directory already exists, and/or 2.) the relevant permissions prevent creating the directory.
move_uploaded_file()
[move_uploaded_file – Moves an uploaded file to a new location]
This function checks that the file referenced by filename is a valid file that was uploaded via PHP’s HTTP POST upload mechanism. If valid, the file will be moved to the filename specified by destination. If the destination file already exists it will be overwritten.
move_uploaded_file(filename, destination);
move_uploaded_file(): returns TRUE on success. No action will occur and FALSE will be returned if filename is not a valid upload file. FALSE will also be returned if filename cannot be moved for some reason – in this instance, no action will occur and a WARNING will be emitted.
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.
Leave a Reply