[go: up one dir, main page]

Menu

[r5]: / trunk / phpsettings.php  Maximize  Restore  History

Download this file

35 lines (24 with data), 962 Bytes

 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
<?php
/* This file is part of testMaker.
testMaker is free software; you can redistribute it and/or modify
it under the terms of version 2 of the GNU General Public License as
published by the Free Software Foundation.
testMaker is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/**
* Checks and sets some PHP settings
* @package Core
*/
ini_set("display_errors", TRUE);
ini_set("error_reporting", E_ALL);
ini_set("magic_quotes_runtime", FALSE);
// Deal with cookie path
$urlPath = $_SERVER['SCRIPT_NAME'];
$urlPath = substr($urlPath, 0, strrpos($urlPath, '/'));
if (!$urlPath) $urlPath = '/';
ini_set('session.cookie_path', $urlPath);
?>