PHP Classes
elePHPant
Icontem

File: WAMP_to_LAMP.php

Recommend this page to a friend!
  Classes of Jill Lingoff  >  Sweeper  >  WAMP_to_LAMP.php  >  Download  
File: WAMP_to_LAMP.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Sweeper
Clean HTML to remove unwanted tags and attributes
Author: By
Last change:
Date: 1 month ago
Size: 776 bytes
 

Contents

Class file image Download
<?php

// this isn't used?
// '([^']*?)\\([^/])([^']*?)' . ... .
include_once('retidy.php');
include_once(
'OM.php');
// linux uses foreslashes in paths whereas windows uses backslashes
// which files have paths in them?
$contents = file_get_contents('retidy.php');
$arrayOStrings = OM::getAllOStrings($contents, "'", "'", 0); // do we have to handle an escaped character? \'
foreach($arrayOStrings as $index => $OString) { // simplistic but sufficient
   
$string_to_change = $OString[0];
   
$changed_string = str_replace('\\', '/', $string_to_change);
    print(
'$string_to_change, $changed_string: ');var_dump($string_to_change, $changed_string);
   
$contents = str_replace($string_to_change, $changed_string, $contents);
}
exit(
0);
file_put_contents('retidy.php', $contents);

?>