Jump to content

gamesmad

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Posts posted by gamesmad

  1. OK, I just whipped up this -

    [code]<?php

    require "config.php";

    $settingscontents = file_get_contents("$boarddir/$account/Settings.php", "r+");

    echo "$settingscontents";

    ?>[/code]

    Where do I go from here, fread() seems to only look through a file by bytes??  I want to find some text in the file and replace it with something else.

    Will
  2. I get the error -

    [code]Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /home/gamesm/public_html/freeforums/suspend.php on line 26[/code]

    Lines 21 - 26 go like this -

    [code]21  $settingscontent = file_get_contents($settingsdir);
    22
    23  $mode[0] = "$maintenance = 0;";
    24  $newmode[0] = "$maintenance = 2;";
    25
    26  $newsettingscontent = preg_replace($mode, $newmode, $settingscontent);[/code]

    Any idea where I am going wrong??  Its stopping my script from working...

    Will
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.