Results 1 to 6 of 6

Thread: help here with PHP

  1. #1
    Zastavnik
    Join Date
    Oct 2014
    Age
    24
    Posts
    31
    Karma
    8

    help here with PHP

    i need a PHP Code that open a file and find a text and replace that with new one i want

  2. #2
    Banovan
    Join Date
    Nov 2013
    Age
    35
    Posts
    469
    Karma
    0

    Re: help here with PHP

    For open you can use fopen("text.php", "r");
    For find and replace you can use 'tag' str_replace($find-word,$replace-word,$string);

    Don't ask constantly for free PHP code, sit and work or pay

    Sorry for BAD English

  3. #3
    Zastavnik
    Join Date
    Oct 2014
    Age
    24
    Posts
    31
    Karma
    8

    Re: help here with PHP

    FoX^ i can pay with BitCoins

  4. #4
    Zastavnik
    Join Date
    Oct 2014
    Age
    24
    Posts
    31
    Karma
    8

    Re: help here with PHP

    milutinke how can i contact with you

  5. #5
    Major
    Join Date
    Mar 2014
    Location
    Бања Лука
    Posts
    708
    Karma
    34

    Re: help here with PHP

    This is just a simple example edit it to your needs

    Code:
    <?php
    $fileName = '';
    $string = '';
    $newString = '';
    
    $content = file_get_contents($fileName);
    $content = str_replace($string, $newString, $content);
    file_put_contents($fileName, $content);
    ?>
    Last edited by GaMeR FoReVeR; 24.05.16 at 18:33.

  6. #6
    Kaplar
    Join Date
    Mar 2022
    Posts
    3
    Karma
    0

    Re: help here with PHP

    Nice to see you here! This post sounds awesome for me, so thanks for sharing this useful information. But do you know is edubirdie illegal? I am going to write some brilliant story about truly facts of our country cultures and, I think, that it could be very interesting and informative for readers. So, fellas, if you wish, you can click on this site and I am sure that it would be your way to students success!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •