Autor Subiect: Acces la $_SERVER in typoscript  (Citit de 611 ori)

alinafleser

  • Administrator
  • Novice
  • *****
  • Mesaje postate: 126
Acces la $_SERVER in typoscript
« : Ianuarie 28, 2010, 01:46:16 pm »
Majoritatea datelor accesibile din array-ul $_SERVER pot fi accesate din typoscript fie folosind conditii:

[globalString = IENV:<cheie> = <valoare>]
([globalString = IENV:REMOTE_ADDR = 192.168.*])

fie preluand valoarea, de exemplu:

temp.test = TEXT
temp.test.value.data = getIndpEnv:REQUEST_URI


Cheile suportate sunt:

URI:
   REQUEST_URI      =   [path]?[query]      
   HTTP_HOST      =   [host][:[port]]   
   SCRIPT_NAME      =   [path_script]++
        PATH_INFO      =   [path_info]
   QUERY_STRING   =   [query]   
   HTTP_REFERER   =   [scheme]://[host][:[port]][path]   

CLIENT:
   REMOTE_ADDR      =   (client IP)
   REMOTE_HOST      =   (client host)
   HTTP_USER_AGENT   =   (client user agent)
   HTTP_ACCEPT_LANGUAGE   = (client accept language)

SERVER:
   SCRIPT_FILENAME   =   Absolute filename of script

Special extras:
   TYPO3_HOST_ONLY =      [host]
   TYPO3_PORT =            [port]
   TYPO3_REQUEST_HOST =    [scheme]://[host][:[port]]
   TYPO3_REQUEST_URL =      [scheme]://[host][:[port]][path]?[query]
   TYPO3_REQUEST_SCRIPT =     [scheme]://[host][:[port]][path_script]
   TYPO3_REQUEST_DIR =      [scheme]://[host][:[port]][path_dir]
   TYPO3_SITE_URL =          [scheme]://[host][:[port]][path_dir] of the TYPO3 website frontend
   TYPO3_SITE_PATH =       [path_dir] of the TYPO3 website frontend
   TYPO3_SITE_SCRIPT =       [script / Speaking URL] of the TYPO3 website
   TYPO3_DOCUMENT_ROOT =   Absolute path of root of documents
   TYPO3_SSL =             Returns TRUE if this session uses SSL/TLS (https)
   TYPO3_PROXY =          Returns TRUE if this session runs over a well known proxy