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 FTP functions, with information extracted and condensed from w3schools.com and php.net.
It enables users to complete a quiz related to the PHP FTP functions.
USAGE:
For each FTP 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 FTP 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
ftp_rawlist()
[ftp_rawlist – Returns a detailed list of files in the given directory]
This function executes the FTP LIST command, and returns the result as an array.
ftp_rawlist(ftp_stream, directory, recursive[optional parameter, with a default value of FALSE]);
[directory specifies the directory path, and may include arguments for the LIST command. If recursive is set to TRUE, the issued command will be LIST -R.]
ftp_rawlist(): returns an array where each element corresponds to one line of text on success; FALSE if directory is invalid. The output is not parsed; the system type identifier returned by ftp_systype() can be used to determine how the results should be interpreted.
ftp_rename()
[ftp_rename – Renames a file or a directory on the FTP server]
This function renames a file or a directory on the FTP server.
ftp_rename(ftp_stream, oldname, newname);
ftp_rename(): returns TRUE on success; FALSE and an E_WARNING-level error on failure.
ftp_rmdir()
[ftp_rmdir – Removes a directory]
This function removes the specified directory from the FTP server.
ftp_rmdir(ftp_stream, directory);
[directory must be a relative or absolute path to an empty directory.]
ftp_rmdir(): returns TRUE on success; FALSE on failure.
ftp_set_option()
[ftp_set_option – Set miscellaneous runtime FTP options]
This function controls [‘sets’] various runtime options for the specified ftp_stream.
ftp_set_option(ftp_stream, option, value);
[option can take the form of FTP_TIMEOUT_SEC [default value of 90 seconds], FTP_AUTOSEEK [enabled by default], or FTP_USEPASVADDRESS.]
ftp_set_option(): returns TRUE if the option could be set; FALSE if not. A warning will be thrown if option is not supported, or the passed value doesn’t match the expected value for the given option.
ftp_site()
[ftp_site – Sends a SITE command to the server]
This function sends the given SITEcommand to the FTP server. SITE commands vary from server to server and are useful for dealing with concepts like file permissions and group membership; these commands are not standardized.
ftp_site(ftp_stream, command);
[command represents the SITE command. There may be some issues with filenames containing spaces and other characters since this parameter is not escaped.]
ftp_site(): returns TRUE on success; FALSE on failure.
ftp_size()
[ftp_size – Returns the size of the given file]
This function returns the size of remote_file on the FTP server in bytes. This feature is not supported by all servers.
ftp_size(ftp_stream, remote_file);
ftp_size(): returns the file size on success; -1 on error.
ftp_ssl_connect()
[ftp_ssl_connect – Opens a Secure SSL-FTP connection]
This function will succeed even if the server is not set up for SSL-FTP – or its certificate is invalid – since it opens an explicitSSL-FTP connection to the specified host. In these instances, the client will send the appropriate AUTH FTP command when ftp_login() is called — resulting in a ftp_login() failure. To make this function available (rather than ‘undefined’) on Windows you must compile your own PHP binaries, since both the ftp module and the OpenSSL support are required to be built statically into PHP.
ftp_ssl_connect(host, port[optional parameter, with a default value of 21], timeout[optional parameter, with a default value of 90 (seconds)]);
[host should have no trailing slashes and should not be prefixed with ftp://.]
ftp_ssl_connect(): returns a SSL-FTP stream on success; FALSE on error.
ftp_systype()
[ftp_systype – Returns the system type identifier of the remote FTP server]
This function returns the system typeidentifier of the remote ftp server.
ftp_systype(ftp_stream);
ftp_systype(): returns the remote system type on success; FALSE on error.
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.