User Tools

Site Tools


uphp:functions:include

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

uphp:functions:include [2018/04/13 18:12]
jeff Improved to include Notes (compilation, uPHP Tags)
uphp:functions:include [2021/09/13 05:57]
Line 1: Line 1:
-======include====== 
- 
-<badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge> 
- 
-Include a file within the current script at the current location 
- 
-====Description==== 
- 
-<well size="sm"><html> 
-<span style="font-size:125%">include ( 
-<span style="color:green">string 
-<span style="color:blue">$filename 
-<span style="color:black">) 
-</html></well> 
- 
-This function includes and evaluates the specified file. When a file is included, the code it contains inherits the variable scope of the line on which the include occurs. Any variables available at that line in the calling file will be available within the called file, from that point forward. If the include occurs inside a function within the calling file, then all of the code contained in the called file will behave as though it had been defined inside that function. So, it will follow the variable scope of that function. 
- 
-====Parameter==== 
- 
-<html><b><span style="color:blue">$filename<span style="color:black"></b>:  <b><span style="color:green">String<span style="color:black"></b> containing the path and filename of the script to include and evaluate</html> 
- 
-====Return Values==== 
- 
-None 
- 
-====Notes==== 
- 
-This function is very useful for including frequently repeated code in multiple scripts. 
- 
-The code contained in the included file is compiled into the script the first time the script is run. If changes are made to the contents of an included file without modifying the script that contains [[include]] then re-compilation must be forced. See [[uphp:uphp_compiler#Notes|The uPHP Compiler]] for more information. 
- 
-The included file is interpreted as HTML unless it contains the opening and closing uPHP Tags ''<?'' and ''?>''. See [[uphp:uphp_language_basics#uPHP Tags|uPHP Language Basics]] for more information. 
- 
-====See Also==== 
- 
-[[call_user_func()]] - Call a user defined function with optional parameters 
- 
-[[exec()]] - Run a script with an optional delay 
- 
-[[function_exists()]] - Check if a function exists (native or custom) 
- 
-[[uphp:statements:function]] - Define a function 
  
uphp/functions/include.txt · Last modified: 2021/09/13 05:57 (external edit)