ENVIRONMENT

Set up the WIKINDX server environment

version 1
package wikindx4\core\startup
author Mark Grimshaw

 Methods

ENVIRONMENT

__construct() 

start the SESSION

startSession() 

Check the permissions of various folders and files which must be writable

checkFolders() 

If permissions are incorrect on a folder or file, die with appropriate message if chmod() does not work.

checkFoldersDie(array $array) 

Parameters

$array

array

An array of folders or filenames and their incorrect permissions

Make sure we get HTTP VARS in whatever format they come in

getVars() 

Use $vars = GLOBALS::getVars(); to get querystrings and form elements

Add slashes to all incoming GET/POST data.

magicSlashes(string $element) : string

We now know what we're dealing with and can code accordingly.

Parameters

$element

string

Returns

string

Check and load configuration from config.php

runConfig() 

Set basic environment

setBasicEnvironment() 

Check PHP version, set browser header, set set_magic_quotes_runtime(), buffer printing and attempt to set PHP memory.

Strip some HTML tags from string.

stripHtmlTags(string $element) : string

Since adding tiny_mce, we only strip javascript and the enclosing

<

p> tag tinymce adds

Parameters

$element

string

Returns

string

 Properties

 

$config 
 

$errors