/ LJCPHPCodeDoc / LJCCommonLib / LJCCommon / GetIndexedDebugFileName


Parameters
$folder - The folder name.
$fileName - The file name.

Returns

The indexed Debug file spec.

Syntax

PHP
public static function GetIndexedDebugFileName(string $folder
, string $fileName) : string

Gets the indexed Debug file name. (E)

Remarks

This function takes a folder name and a file name. It makes sure the folder exists and returns the text "folder/fileName$index" with the extension "txt".

The variable $index in the example file name indicates a unique index value that does not already exist on disk. It begins checking with an index value of 1.

Example

PHP
 $webCommonPath = "c:/inetpub/wwwroot/LJCPHPCommon";
 require_once "$webCommonPath/LJCCommonLib.php";
 
 // $debugFileSpec = "Debug\SourceFile1.txt"
 $debugFileSpec = LJCCommon::GetIndexedDebugFileName("Debug"
   , "SourceFile.php");

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.