This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 227
Expand file tree
/
Copy pathinclude.lcdoc
More file actions
56 lines (37 loc) · 1.5 KB
/
include.lcdoc
File metadata and controls
56 lines (37 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Name: include
Type: command
Syntax: include <path>
Summary:
The <include> command executes the given script in the context
of the global environment.
Introduced: 4.6.3
OS: mac, windows, linux
Platforms: server
Example:
include "includes/foo.lc"
Example:
include "/home/mark/www/scripts/foo.lc"
Parameters:
path (enum):
The path to the file containing the script to include.
- An <absolute file path|absolute path> to the file. For example
"/home/user/www/scripts/foo.lc".
- A <relative file path|relative path> to the file. Relative paths are
resolved relative to the current folder. For example "includes/foo.lc"
where folder 'includes' is in the current folder.
Description:
Use the <include> command to load scripts contained in other files.
<Include> is only available when running in <CGI> mode (Server).
>*Note:* LiveCode server scripts do not require specific file
>extensions. Common extensions used include ".irev" and ".lc".
>
>*Note:* Upon <include> a script is loaded into memory and parsed. Any
>variables and handler definitions are added to the <global> (script)
>environment. Then, each command/function is executed in order as it is
>encountered in the file.
>
>*Note:* The behavior of the <include> command is identical regardless
>of where it is run from; e.g. if it is run from a handler in a stack,
>it only affect the <global> script environment (home stack).
References: absolute file path (glossary), relative file path (glossary),
CGI (glossary), defaultFolder (glossary), global (glossary)