Announcement

Collapse
No announcement yet.

PHP error in my script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP error in my script

    Hi,

    I've made a script where I can open text-files, like this:
    Code:
    echowindow.php?files=1;3-5
    window1.txt, window3.txt, window4.txt and window5.txt will be opened

    On my local machine everything works fine (with PHP4), but not on the internet.
    check: http://www.patrickjansen.net/temp/ec...en&files=1;3-5

    I recieve this error(s):
    Code:
    Warning: No ending delimiter found in /usr/.../vhosts/patrickjansen.net/httpdocs/temp/echowindow.php on line 144
    Warning: No ending delimiter found in /usr/.../vhosts/patrickjansen.net/httpdocs/temp/echowindow.php on line 144
    This is the code arround line 144:
    PHP Code:
    //Break $files who came from url
      
    $filenumbers explode (";"$files);
        foreach (
    $filenumbers as $file)
        {
        if ( 
    preg_match('[-]',$file) ) {    //LINE 144
          
    list($range_start$range_end) = split ('[-]'$file);
          if ( 
    $range_start $range_end )
          {
            
    $range_start $range_start * -1;
            
    $range_end $range_end * -1;
          }
          
    $filerange range($range_start,$range_end);
          foreach (
    $filerange as $file)
          {
            if ( 
    $file != NULL )
              
    $nummer[] = abs($file);
          }
        }
        else {
          if ( 
    $file != NULL )
            
    $nummer[] = $file;
        }
      } 
    Will this error occure, because of a script error, or is it because of the wrong PHP versie (PHP3)?
    I don't know yet which PHP version is used.

    Bob Day
    Last edited by Bob Day; Tue 16 Oct '01, 4:11am.

  • #2
    try this for line 144:
    if ( preg_match('/[-]/',$file) ) {

    make a file and put this in it:
    PHP Code:
    <?
    phpinfo
    ();
    ?>
    Now load it in a browser.

    Comment


    • #3
      Thanks,

      I'll send it to my cousin. He have to up it for me.

      Bob Day

      Comment

      Loading...
      Working...
      X