Zebra_Form::assets_path PHP Method

assets_path() public method

These files are required for CAPTCHAs and uploads. By default, the location of these files is in the same folder as Zebra_Form.php and the script will automatically try to determine both the server path and the URL to these files. However, when the script is run on a virtual host, or if these files were moved, the script may not correctly determine the paths to these files. In these instances, use this method to correctly set the server path - needed by the script to correctly include these files, and the URL - needed by the client-side validation to include these files. Also, for security reasons, I recommend moving these two files by default to the root of your website (or another publicly accessible place) and manually set the paths, in order to prevent malicious users from finding out information about your directory structure. If you move these files don't forget to also move the font file from the "includes" folder, and to manually adjust the path to the font file in "process.php"!
public assets_path ( string $server_path, string $url ) : void
$server_path string The server path (the one similar to what is in $_SERVER['DOCUMENT_ROOT']) to the folder where the "process.php" and "mimes.json" files can be found. With trailing slash! @param string $url The URL to where the "process.php" and "mimes.json" files can be found. With trailing slash! @return void
$url string
return void
    function assets_path($server_path, $url)
    {
        // set values
        $this->form_properties['assets_server_path'] = $server_path;
        $this->form_properties['assets_url'] = $url;
    }