Function __global->find_script

Definitions

sources/global2.php

  • Find the URL to a certain entry point script, located in the root directory, top level of a zone directory, data directory, or data_custom directory.Why this function? Because the software allows these to be moved around between zone directories, to suit site .htaccess requirements).
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$name string No No required parameter N/A N/A The codename of the needed script
$append_keep boolean No No False N/A N/A Whether to append keep variables

Returns

  • The URL to the script
  • Type: URLPATH
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find the URL to a certain entry point script, located in the root directory, top level of a zone directory, data directory, or data_custom directory.Why this function? Because the software allows these to be moved around between zone directories, to suit site .htaccess requirements).
 *
 * @param  string $name The codename of the needed script
 * @param  boolean $append_keep Whether to append keep variables
 * @return URLPATH The URL to the script
 */

function find_script(string $name, bool $append_keep = false) : string