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.

Perl: require extern aufrufen ???

Empfohlene Antworten

Veröffentlicht

Guten Tag zusammen :)

also zur zeit sieh es noch so aus


require "text1.txt";

require "text2.txt";

require "text3.txt";

ich möchte aber mit cgi-bin/dateiname?text1.txt

die informationen aus text1.txt auslesen und

mit cgi-bin/dateiname?text2.txt aus text datei 2 ...

wie geht das ???

Vielen dank !

MFG Xuser

Also generell müßte der Aufruf eher so aussehen:

/cgi-bin/script.cgi?file=datei1.txt

Dann kannst du über


#!/usr/bin/perl


use strict;

use CGI;


my $lCGI = new CGI;

my $Datei = $lCGI->param('file');

an den Dateinamen ran. Aber es ist dann gefährlich, diesen einfach in einem require Statement einzubauen. Damit dürfte jeder, der die Funktionsweise des Scriptes kennt und Dateien auf dem Webserver ablegen darf, eigene Perlscripte ausführen lassen - nicht gut.

Wenn es sich nur um Daten handelt, brav mit open öffnen und einlesen. Dann kann man auch die Syntax checken.

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.