Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

rekursiven base64_decode auf SimpleXmlElement

Empfohlene Antworten

Veröffentlicht

Ich will mit dem Thread jetzt keine Grundsatzdiskussion starten ob man sowas macht oder nicht, damit das gleich vornerein klar ist. Das ist halt so und fertig.

Ich habe eine XML Datei in der sämtliche Attribute und Inhalte base64_encoded sind. Die Datei wird per simplexml ausgelesen. danach soll durch das gesamte objekt durchgelaufen werden um alle attribute und inhalte zu base64_decode()n.

Leider funktioniert meine Implementierung aber nicht und ich weiß nicht warum. Ich tippe drauf dass php die Referenzen irgendwie nicht mag...

		
private function rec_base64_decode($base_element) {
$attr = $base_element->attributes();

foreach ( $attr as &$attribute ) {
$attribute = base64_decode($attribute);
}
$children = $base_element->children();
foreach ( $children as &$child ) {
$this->rec_base64_decode($child);
}

return $base_element;
}[/PHP]

Jemand ne Idee?

mfg

Jan

Ohne Referenzen kann ich ja nix in das Element rein schreiben. Ich hab irgendwie das Gefühl dass ich im Endeffekt den kompletten Tree in ein array tree kopieren muss dann dürfte das funzen ... hmmmm

Der Zerschießt mir mit den Referenten anscheinend den kompletten Object-Tree...

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.