PreviousNext
Help > API Functions > Native database access > i5_free_file
i5_free_file

 

Closes file handle and frees file resources.

 

      bool i5_range_ file (resource file)

 

Parameters

 

file

IBM i file resource

 

 

Return

True if OK, false if failed.

 

I5_ERR_PHP_HDLDFT

256

No default connection found.

I5_ERR_PHP_OPTIONSTYPE

259

The type of " I5_OPTIONS_ALIAS" option must be x

 and not x

I5_ERR_PHP_OPTIONSNUMBER

260

Option number -1 is unknown.

I5_ERR_PHP_TYPEPARAM

262

Type of element x in parameter -1 must be y.

Type z was provided.

 

 Details

 Frees file resource opened with i5_open and closes it on IBM i.

 

 

Example

 

$file_client = i5_open("PROD/CLIENTS");

[... treatments ...]

 

$closed = i5_free_file($file_client);

if ($closed) {

     echo "Closing successful";}

 

 

See also

i5_open

i5_free_query