In text data sources you can make usage of special Phi variables. The Phi variables are substituted by their value. Ensure you checked the field Parse data in the Text source dialog otherwise the variables will not be substituted.
See also: Text sources.
- 1 $PHIALL
- 2 $PHICOOKIE
- 3 $PHIFILE
- 4 $PHIGET
- 5 $PHIHEADER
- 6 $PHIPOST
- 7 $PHIREQUEST
- 8 $PHISERVER
- 8.1 accept
- 8.2 admin
- 8.3 agent
- 8.4 contenttype
- 8.5 contentlength
- 8.6 documentroot
- 8.7 filename
- 8.8 hostname
- 8.9 keepalive
- 8.10 lang
- 8.11 localaddress
- 8.12 method
- 8.13 modified
- 8.14 month
- 8.15 monthlist
- 8.16 nowutc
- 8.17 password
- 8.18 port
- 8.19 postdata
- 8.20 remoteaddress
- 8.21 self
- 8.22 serverdef
- 8.23 serverhost
- 8.24 servername
- 8.25 started
- 8.26 tempdir
- 8.27 today
- 8.28 url
- 8.29 user
- 8.30 useragent
- 8.31 userengine
- 8.32 useros
- 8.33 version
- 8.34 year
- 8.35 yearlist
- 9 $PHISQL
Searches in all categories ie. cookies, GET variables, POST variables, etc. This can be time consuming.
Returns the cookie set for name or an empty string if the cookie is not set.
Returns the appropriate component of an uploaded file for name. The component filename returns the original file name, tmpfile is the absolute path where the file is temporarely stored and size is the file size in bytes.
$PHIFILE[name][filename] $PHIFILE[name][tmpfile] $PHIFILE[name][size]
Returns the value for name for a GET request.
Returns the HTTP header string for header.
Returns the browser agent string:
See also: HTTP header.
Returns the value for name for a POST request.
Note: in Phi all form input elements are sent as POST data.
Searches in the categories GET, POST and COOKIE.
The contents of myfield will be returned if it was set by a GET, POST or COOKIE request.
Note: A cookie has precedence before a POST and a POST before a GET if concurrent values are set.
Contains the HTTP accept string the browser sent. This is the same as $PHIHEADER[accept].
The server administrator's email address.
Client user agent string. This is the same like $PHIHEADER[User-Agent].
Content type of the request.
Length in bytes of the requested POST data.
Contains the document root as an absolute path.
Requested filename including the absolut path on the local maschine.
The requested domain (part of the HTTP header Host: domain).
Contains the keep alive time a connection remains valid without any data exchange. This can be set in the server configuration.
Returns the current language used for this page requested by the browser and available by the server or the default language 'C' if no language does match. This may be overwritten by philang=<lang id> in the URL query string.
Contains the local IP address of the server.
See also: $PHISERVER[remoteaddress].
Request method (usually http or https).
Date and time of the last modification of $PHISERVER[filename] in the format yyyymmddhhmmsszzz.
Returns the name of the current month (translated by the system locale) for $PHISERVER[lang].
$PHISERVER[month] or $PHISERVER[month]
To optain a translated month name in the year (in this example february) use:
Returns a complete monthlist separeted by '\n' with the respective month number in squared brackets.
Note: the month names are automatically translated to the appropriate language if the requested locale is available on the server maschine.
Date and time in GMT (universal time) in the format yyyymmddhhmmsszzz.
See also: $PHISERVER[started].
Contains the password part of the HTTP header (ie. if you protect pages with .htaccess).
See also: $PHISERVER[user].
The actual port the server is listening on (usually 80 or 8080).
Contains the POST data as a complete URL query string.
Contains the remote IP address of the client for this request.
See also: $PHISERVER[localaddress].
Path of the current requested URL.
Server definition string. In conjunction with Phis server this is usually default.
Full qualified domain name of the server.
Date and time when the request started in the format yyyymmddhhmmsszzz in local server time.
See also: $PHISERVER[nowutc].
Contains the server's temporary directory where database files and images are stored.
Returns the current date in the ISO format YYYY-MM-DD or days after/before if you specify an index.
$PHISERVER[today] $PHISERVER[today] (three days in the future) $PHISERVER[today][-5] (five days in the back)
URL string of the request.
Contains the user part of the HTTP header (ie. if you restrict pages with .htaccess.
See also: $PHISERVER[password].
Returns the user agent as a string. Currently supported are:
Returns the user engine as a string. Supported are:
Returns the user operating system as a string. Currently supported are:
Returns the current Phi version in the form 'major.minor.patch'.
Returns the current year in the ISO format or a year in the future or in the back by the offset.
$PHISERVER[year] (2010, if this is the current year) $PHISERVER[year] (2013, if 2010 is the current year) $PHISERVER[year][-2] (2008, if 2010 is the current year)
Returns a year list separated by a '\n' if you specify an index or the currenty year without any index.
$PHISERVER[yearlist] (2010\n2011\n2012, if 2010 is the current year)
The maximum index is 1000.
Returns the SQL value at position x (starting from 0).
Asume the following SQL statement:
SELECT firstname, lastname FROM persons WHERE id=$PHIGET[uid]
Then lastname will be accessible through: