Current location: Hot Scripts Forums » Programming Languages » PHP » Help what is this message and how to fix


Help what is this message and how to fix

Reply
  #1 (permalink)  
Old 12-29-09, 09:37 AM
themuffin themuffin is offline
New Member
 
Join Date: Dec 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rolleyes Help what is this message and how to fix

Warning: eregi_replace(): REG_BADRPT in /home/content/*.*/includes/t_script.php on line 26

I have 2 other sites that use this smae tscript file.. I will add it below:

PHP Code:

<?php

class Page
{
  var 
$page;

  function 
Page($template "includes/template.html") {
    if (
file_exists($template))
      
$this->page join(""file($template));
    else
      die(
"Template file $template not found.");
  }

  function 
parse($file) {
    
ob_start();
    include(
$file);
    
$buffer ob_get_contents();
    
ob_end_clean();
    return 
$buffer;
  }

  function 
replace_tags($tags = array()) {
    if (
sizeof($tags) > 0)
      foreach (
$tags as $tag => $data) {
        
$data = (file_exists($data)) ? $this->parse($data) : $data;
        
$this->page eregi_replace("{" $tag "}"$data,
                      
$this->page);
        }
    else
      die(
"No tags designated for replacement.");
  }

  function 
output() {
    echo 
$this->page;
  }
}
?>

Last edited by wirehopper; 12-29-09 at 12:39 PM. Reason: PHP tags
Reply With Quote
  #2 (permalink)  
Old 12-29-09, 12:41 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,515
Thanks: 20
Thanked 109 Times in 106 Posts
Reply With Quote
  #3 (permalink)  
Old 12-29-09, 04:34 PM
ruteckycs's Avatar
ruteckycs ruteckycs is offline
Coding Addict
 
Join Date: Jul 2009
Posts: 377
Thanks: 6
Thanked 10 Times in 10 Posts
Its from an invalid regular expression.
__________________
This post was created with 100% recycled electrons.

Last edited by wirehopper; 12-29-09 at 06:27 PM. Reason: Removed reference.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do i search from a form to mysql database using php QTortZ PHP 6 06-02-04 09:57 PM


All times are GMT -5. The time now is 08:06 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.