vae_include_once()

The vae_include_once() function is a replacement of the PHP internal include_once() construct that is designed to work properly with the Vae Local Development Environment.

Use it as you would use include_once() in PHP.

If you are using the Vae Local Development Environment, this will ensure that the latest version of the included file from your development machine is included when developing locally.

This function will error if the file being included does not exist, despite the different PHP behavior on their include().

You may call this function multiple times on the same filename and the file will only included a single time.

vae_include_once() is identical in function to vae_require_once().

Usage

vae_include_once($filename)

  • $filename - Filename to include.

Returns

Returns true.

Sample Usage

<?php
vae_include_once("/my_library/library.php");
?>