~hexmode/+junk/main

« back to all changes in this revision

Viewing changes to install-files/scripts/switchPhpParam.php

  • Committer: Mark A. Hershberger
  • Date: 2008-01-05 19:38:56 UTC
  • Revision ID: hershberger@spawn-xp-20080105193856-6rnzgwa4nehue3qj
initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
 
 
4
require 'config.inc.php';
 
5
 
 
6
$phpIniFileContents = @file_get_contents($c_phpConfFile) or die ("php.ini file not found");
 
7
 
 
8
 
 
9
 
 
10
if ($_SERVER['argv'][2] == 'off')
 
11
{
 
12
    $findTxt  = $_SERVER['argv'][1].' = On';
 
13
    $replaceTxt  = $_SERVER['argv'][1].' = Off';
 
14
}
 
15
else
 
16
{
 
17
    $findTxt  = $_SERVER['argv'][1].' = Off';
 
18
    $replaceTxt  = $_SERVER['argv'][1].' = On';
 
19
}
 
20
 
 
21
 
 
22
$phpIniFileContents = str_ireplace($findTxt,$replaceTxt,$phpIniFileContents);
 
23
 
 
24
$fpPhpIni = fopen($c_phpConfFile,"w");
 
25
fwrite($fpPhpIni,$phpIniFileContents);
 
26
fclose($fpPhpIni);
 
27
 
 
28
 
 
29
?>
 
 
b'\\ No newline at end of file'