Xampp for Win & Xammp for Linux

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Xampp for Win & Xammp for Linux

Postby eduran » 19. April 2008 14:57

Hi. Following php script is working at Xampp for windows but it isn't working at Xampp for linux. Also this script hasn't worked at linux based os. Freebsd, pardus etc. And php is crashed.

Thanks for your help.

Code: Select all
<?php

   function enclose($start, $end1, $end2)
   {
      return "$start((?:[^$end1]|$end1(?!$end2))*)$end1$end2";
   }
      
      $fcont = file_get_contents("http://www.gazi.edu.tr");      
      $pstring1 = "'[^']*'";
      $pstring2 = '"[^"]*"';
      $pnstring = "[^'\">]";
      $pintag   = "(?:$pstring1|$pstring2|$pnstring)*";
      $pattrs   = "(?:\\s$pintag){0,1}";
      
      $pcomtag = enclose('<!--', '-', '->');
           $pscrtag = enclose("<script$pattrs>", "<", "\\/script>");
                $pstytag = enclose("<style$pattrs>", "<", "\\/style>");
 
      $pexclude = "(?:$pcomtag|$pscrtag|$pstytag)";
      $fcont2 = preg_replace("/$pexclude/iX", '', $fcont);
      
      echo $fcont2;
   
?>   
eduran
 
Posts: 1
Joined: 19. April 2008 14:15

Postby Dave_L » 20. April 2008 11:47

Which version of XAMPP and PHP?

Is the PHP setting allow_url_fopen on?
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 144 guests