PHP - Ein ?> ans Ende von 11.000 Dateien

Weby

Lt. Commander
Registriert
Feb. 2009
Beiträge
1.445
Hallo Leute,

ich muss in ca. 11.000 PHP Dateien ein fehlendes ?> einfügen.

Wie kann ich das z.B. mit Notepad++ realisieren?


Vielen Dank im Voraus :)
 
Meine beiden Vorredner haben natürlich Recht.

Falls du es doch machen möchtest, "\z" (end of subject) is your friend.
notepad++.png
 
Und du meinst N++ kann 11000 Files offen halten..?

Mit geeigneten Pfadzugriffen Zeilenweise einlesen und mit dem End-Tag wieder ausschreiben, etwa per WSH oder VBA.

CN8
 
Ich wollte es einfügen wegen folgenden Fehler:
Code:
Parse error:  syntax error, unexpected $end in............
 
Code:
<?php
    error_reporting(E_ALL);
	include_once 'classes/dbconnect.php';
    require_once('Smarty-2.6.26/libs/Smarty.class.php');
	$tpl = new Smarty();
	$tpl->template_dir = 'data/templates';
	$tpl->compile_dir 	= 'data/templates_c';
	$tpl->cache_dir 	= 'data/cache';
	$tpl->config_dir 	= 'data/configs';
    
	//Login-System initialieren
	include_once 'Login/login.php';
	if(isset($_GET['logout']) && $_GET['logout'] == 'true')
	{
		include_once 'Login/logout.php';
		echo '<meta http-equiv="refresh" content="0;url=index.php?planung='.$planung.'">';
	}
	
	if(isset($_SESSION['UserID']))
	{
		$tpl->assign('loggedin','1');
		$myPlanungen = $db->queryarray("select * from planung where p_owner = " . $_SESSION['UserID'] . " ORDER BY p_id");
	 	
		$tpl->assign('myPlanungen',$myPlanungen);
	}
	else
	{
		$tpl->assign('loggedin','0');
	}
	if(!isset($_SESSION['UserID'])) header("Location: index.php");
	
	    	$tpl->assign('firmenID',$db->querysingle_field("SELECT firmenId FROM User WHERE ID = " . $_SESSION['UserID'],"firmenId"));
    echo "<?phpxml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n";
    
    
    $myPlanungen = $db->queryarray("select * from planung where p_owner = " . $_SESSION['UserID']);
    if(isset($_GET['module']))
    	$module=$_GET['module'];
    
    if(isset($_GET['action']))
    {
    	if($_GET['action'] == 'delete')
	    {
	    	$planung = $_GET['planung'];
	    	$db->query("delete from block where p_id = " . $planung);
	    	$db->query("delete from element where p_id = " . $planung);
	    	$db->query("delete from wand where p_id = " . $planung);
	    	$db->query("delete from planung where p_id = " . $planung);
	    	echo 'L&ouml;schen erfolgreich.';
	    }
    }
    
    $isadmin = $db->querysingle_field("select count(*) from User_Rechte where Recht = 'admin' AND UserID = ".$_SESSION['UserID'],"count(*)");
    if($isadmin==0)
    	return;
   
    
    if(!isset($module))
    	$module = "angebote";
   
  
?>

<head>

<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="css/admin.css" type="text/css" /><link rel="stylesheet" href="css/planer.css" type="text/css" />
 <link rel="stylesheet" href="css/planerNewSpacer.css" type="text/css" />
 <link rel="stylesheet" href="css/planerindex.css" type="text/css" />
<link type="text/css" href="js/jquery-ui/css/custom-theme/jquery-ui-1.8.13.custom.css" rel="stylesheet" />	
<script src="js/jquery-ui/js/jquery-1.5.1.min.js"></script>
<script src="js/jquery-ui/js/jquery-ui-1.8.13.custom.min.js"></script>
<script>
	jQuery(function($){
        $.datepicker.regional['de'] = {clearText: 'l&ouml;schen', clearStatus: 'aktuelles Datum l&ouml;schen',
                closeText: 'schlie&szlig;en', closeStatus: 'ohne &Auml;nderungen schlie&szlig;en',
                prevText: '&#x3c; zur&uuml;ck', prevStatus: 'letzten Monat zeigen',
                nextText: 'Vor &#x3e;', nextStatus: 'n&auml;chsten Monat zeigen',
                currentText: 'heute', currentStatus: '',
                monthNames: ['Januar','Februar','M&auml;rz','April','Mai','Juni',
                'Juli','August','September','Oktober','November','Dezember'],
                monthNamesShort: ['Jan','Feb','M&auml;r','Apr','Mai','Jun',
                'Jul','Aug','Sep','Okt','Nov','Dez'],
                monthStatus: 'anderen Monat anzeigen', yearStatus: 'anderes Jahr anzeigen',
                weekHeader: 'Wo', weekStatus: 'Woche des Monats',
                dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
                dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
                dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
                dayStatus: 'Setze DD als ersten Wochentag', dateStatus: 'W&auml;hle D, M d',
                dateFormat: 'dd.mm.yy', firstDay: 1, 
                initStatus: 'W&auml;hle ein Datum', isRTL: false};
        $.datepicker.setDefaults($.datepicker.regional['de']);
});
	$(function() {
		$( "#datepicker1" ).datepicker();
		$( "#datepicker2" ).datepicker();
	});
	</script>

</head>
<body>

<div style="height:27px;width:920px;margin:auto;margin-top:10px;text-align:left;"><?php $tpl->display('topbar.html'); ?></div>
<div style="height:20px;display:block;"></div>
<div class="wrapper" style="border:1px solid #000000;">

<div class="banner"></div>

<div class="progress">
	<div class="<?php if($module != 'angebote'){ ?>in<?php} ?>active"><div class="step">x</div><div class="description"><a href="admin.php?module=angebote">Angebote/Bestellungen</a></div></div>
	<div class="<?php if($module != 'users' && $module != 'profile'){ ?>in<?php} ?>active"><div class="step">x</div><div class="description"><a href="admin.php?module=users">Benutzer/Kunden</a></div></div>
	<div class="<?php if($module != 'prices'){ ?>in<?php} ?>active"><div class="step">x</div><div class="description"><a href="admin.php?module=prices">Preise/Farben</a></div></div>
    <div class="active"><div class="step">x</div><div class="description"><a href="http://www.anbieter.de/gbuch.php?id=50000000127899687241465018" target="_new">G&auml;stebuchverwaltung</a></div></div>
</div>
<div style="clear:both"></div>
<br />
<?php 
if($module=='angebote')
	include_once 'angebote.php';
if($module=='users')
	include_once 'Login/userliste.php';
if($module=='profile')
	include_once 'myprofil.php';
if($module=='prices')
	include_once 'prices.php'; ?>
<!-- 

<fieldset>
<legend><strong>Funktionen im Adminbereich</strong></legend>
<ul>
	<li><a href="angebote.php">Angebote verwalten</a></li>
</ul>

<dl>

 <dt><a href="Login/registrierung.php">Registrierung</a></dt>
 <dd>Registrierungsformular zum Registrieren neuer User (<code>"registrierung.php</code>)</dd>
 <dt><a href="Login/login.php">Login</a></dt>
 <dd>Loginformular zum Einloggen (<code>login.php</code>)</dd>
 <dt><a href="Login/logout.php">Logout</a></dt>
 <dd>"Logoutbutton" (<code>logout.php</code>)</dd>
 <dt><a href="Login/userliste.php">Userliste</a></dt>
 <dd>Auflistung aller registrierten User (<code>userliste.php</code>)</dd>
 <dt><a href="Login/myprofil.php">Mein Profil</a></dt>
 <dd>Das eigene Profil zum editieren (<code>"myprofil.php</code>)</dd>
 <dt><a href="Login/admin/index.php">Adminbereich</a></dt>
 <dd>Registrierungsformular zum Registrieren neuer User (<code>admin/index.php</code>)</dd>
</dl>
</fieldset>

-->
</div>

</body>

?>
 
Zeile 156 - ?> funktioniert dort nicht, gibt ja keine öffnenden PHP-Tags.

Aber zu deinem Problem: Du solltest in den Zeilen 110, 111 und 112 mal ein Leerzeichen zwischen <?php und } machen.
 
Werde das mal an den Entwickler weitergeben - Ich als Admin versuche nur mein Glück etwas zu beheben. Vielen Dank.
 
Zurück
Oben