Function __global->shorten_urlencoded_filename

Definitions

sources/urls_simplifier.php

  • Shorten a filename so it will fit in the database.Also see cms_rawurlrecode.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$filename string No No required parameter N/A N/A The filename
$length integer No No 226 N/A N/A The length

Returns

  • The shortened filename
  • Type: string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Shorten a filename so it will fit in the database.Also see cms_rawurlrecode.
 *
 * @param  string $filename The filename
 * @param  integer $length The length
 * @return string The shortened filename
 */

function shorten_urlencoded_filename(string $filename, int $length = 226) : string