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_alloc()
[ftp_alloc – Allocates space for a file to be uploaded]
This function allocates space for a file to be uploaded by sending an ALLO command to the remote FTP server. Owing to the fact that many servers do not support this command, it is best to reserve this function for servers that explicitly require preallocation.
ftp_alloc(ftp_stream, filesize, &result[optional parameter – if a variable is provided, a textual representation of the server’s response will be returned by reference]);
ftp_alloc(): returns TRUE on success; FALSE on failure.
ftp_append()
[ftp_append – Append content of a file to another file on the FTP server]
This function appends the content of a file to another file on the FTP server.
ftp_append(ftp_resource, remote_file, local_file, mode[optional parameter, with a default value of FTP_IMAGE]);
ftp_append(): returns TRUE on success, FALSE on failure.
ftp_cdup()
[ftp_cdup – Changes to the parent directory]
This function navigates one level up the FTP directory structure; thus, it changes to the parent directory.
ftp_cdup(ftp_stream);
[The ftp_stream parameter represents the link identifier of the FTP connection.]
ftp_cdup(): returns TRUE on success, or FALSE on failure.
ftp_chdir()
[ftp_chdir – Changes the current directory on a FTP server]
This function changes the current directory on a FTP server to the one specified by directory.
ftp_chdir(ftp_stream, directory);
ftp_chdir(): returns TRUE on success; FALSE and a warning on failure.
ftp_chmod()
[ftp_chmod – Set permissions on a file via FTP]
This function sets permissions on [‘changes the mode of] remote_file to mode via FTP.
ftp_chmod(ftp_stream, mode, filename);
[mode specifies the new permissions, given as an octal value].
ftp_chmod(): returns the new file permissions as an integer on success; FALSE on error.
ftp_close()
[ftp_close – Closes an FTP connection]
This function – an alias of ftp_quit() – closes ftp_stream and releases the resource.
ftp_close(ftp_stream);
[Once this function has been called, the FTP connection can no longer be used; a new FTP connection must be created using ftp_connect().]
ftp_close(): returns TRUE on success; FALSE on failure.
[port specifies an alternate port to connect to, with a default FTP port value of 21. timeout specifies the timeout in seconds for all subsequent network operations; the default value is 90. This value can be changed (ftp_set_option()) and queried (ftp_get_option()) at any time.]
ftp_connect(): returns an FTP stream on success; FALSE on error.
ftp_delete()
[ftp_delete – Deletes a file on the FTP server]
This function deletes the file specified by path from the FTP server.
ftp_delete(ftp_stream, path);
ftp_delete(): returns TRUE on success; FALSE on failure.
ftp_exec()
[ftp_exec – Requests execution of a command on the FTP server]
This function sends a SITE EXECcommand request to the FTP server.
ftp_exec(ftp_stream, command);
ftp_exec(): returns TRUE if the command was successful [server responded with HTTP code 200]; FALSE otherwise.
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