|
SYNOPSIS
<vxinfo $what [$arg ...]>
DESCRIPTION The vxinfo function returns miscellaneous Vortex information,
depending on the $what parameter:
-
outputsz
Returns the number of bytes output by the script so far, as a
long. This does not count redirected output, ie. the input to
CAPTURE, EXEC etc. blocks. -
db
Returns the current database path used by SQL statements.
This is changeable with the DB statement
(p. ). Note: the database used by SQL
statements can also be set on a per-statement basis by the
DB option to SQL (p. ). -
globaldb
Returns the global database path, which is used for the EXPORT
TABLE variables, and is the default database for SQL
statements unless overridden at run-time. This is settable with
the DB directive (p. ). -
version
Returns the version string: the second line of information printed
by texis -version. This can be used by a script to check
if certain functionality it wishes to use is supported by the
texis executable running it, by checking the version
number/date. -
installdir
Returns the directory that Texis was installed in. This is
usually ``/usr/local/morph3'' under Unix, or
``c:\morph3'' under Windows, but may be a different
directory depending on the user's installation. Added in version
3.01.982700000 20010220. -
htmlmode
Returns 1 if in HTML mode, 0 if not. If in HTML mode, variables
are automatically HTML-escaped when printed; this is the default
if the URL file extension (p. ) is
.htm or .html. Can be changed with
<vxcp htmlmode> (p. ). Added in version
3.01.982400000 20010217. -
release
Returns the date of the Vortex (texis) executable's release.
This can be used to check for the availability of certain Vortex
features in the executable running the script, for portability
between versions. (Note that the existence of <vxinfo release>
itself should be checked too, by setting $ret to a very
early date before calling vxinfo.) Added in version
3.01.980000000 20010120. -
license $name
Returns the Texis license value corresponding to $name,
which can be one of the following: violationmsg,
violationtime, gentime, expiretime,
verifytime, verifytrytime, serial,
curhits, curhitstime, maxhits,
curtblrows, maxtblrows, curtblsz,
maxtblsz, curdbrows, maxdbrows,
curdbsz, maxdbsz, curtotrows,
maxtotrows, curtotsz, maxtotsz,
texismonitorpid, equivpath, uequivpath,
vortexlog, defaultdb, defaultscript,
vortexflags, texisflags, schemas.
Added in version 3.01.985300000 20010322. -
content
Returns the raw content of the POST or multi-part MIME upload
to the script, if any. This can be used to proxy the same
POST vars to a remote script with submit. (Note that
Vortex parses the POST/MIME input for variables and automatically
sets them in Vortex; obtaining the raw content is only needed
for re-submitting an identical request to another script, or
cache systems, etc.) Added in version 3.01.990000000 20010515. -
stack dump [$N]
Dumps current Vortex stack information and returns it in
$ret, one level per line. Optional $N, which
defaults to 0, is bitwise OR of flags:
-
1 Dump all items, not just function calls -
2 Dump parameters too -
4 Dump full length of parameter values -
8 Print global variables too
This information can be used when debugging a script, to determine
where a function was called from. These flags, and the format of
the output, are subject to change without notice in future versions.
Added in version 3.01.987820000 20010420. -
texisconf [$section [$setting [$default]]]
Returns current texis.cnf configuration value for
$setting in $section. The $section may be
numeric, where sections are numbered from 0 in the order they appear
in the file; this is useful if the same-named section occurs multiple
times (eg. Httpd Fast CGI). If $default is given,
that value is returned as a default value if the setting is not
present. If $setting is not given, all setting names in
$section are returned. If $section is not given,
all section names in the file are returned, in file order.
Added in version 4.04.1079750000 20040319. -
texisconffrom $file [$section [$setting [$default]]]
Same as texisconf, but reads settings from $file
instead of the active config. If $file is empty, the
default texis.cnf file in the install dir is used (this may
still be different from the file used by texisconf, ie. if
-conf overrode the config file on the command line, the
latter will be used by texisconf). Added in version
4.04.1079750000 20040319. -
sourcepath
Returns the file path to the currently running script. More
permanent than the $sourcepath variable, which could be
accidentally modified by the script.
Added in version 4.04.1077500000 20040222. -
sourcepathnoext
Returns the file path to the currently running script, but without
its extension. Added in version 5.01.1197080000 20071207. -
execreadline
When called from within an <EXEC> block, returns the next
line of data from the program's output, without the trailing
newline, blocking if needed until data is available. Returns
empty (0 values) if EOF has been reached, ie. the program exited
and all data has been read. Each line read is removed from the
(later) $ret return value of the closing </EXEC>.
Normally it is easier to simply use $ret after
</EXEC>. However, at </EXEC> the program's standard
input has been closed and the program has exited.
<vxinfo execreadline> provides a way to read data in real
time from a program, while still potentially sending new input to
it. This is useful for ``interactive'' programs, where the next
line of input to the program may depend on previous output from
it. Added in version 5.01.1109710555 20050301.
DIAGNOSTICS The vxinfo function returns setting-dependent value(s).
EXAMPLE This example logs the path and size of a page after it is delivered
by the script:
... print a page of results ...
<vxinfo outputsz>
<SQL NOVARS "insert into log values($REQUEST_PATH, $ret)"></SQL>
<exit>
CAVEATS The vxinfo function was added in version 3.01.967200000 20000824.
SEE ALSO
vxcp
Copyright © Thunderstone Software Last updated: Wed Sep 10 11:16:28 EDT 2008
|