include() - wie bindet man eine nicht drupal funtion ein?
am 19.03.2008 - 13:28 Uhr in
Das im Block-Formular:
<?php
$lines = file('/news.php');
$lines = array_reverse($lines);
for ($i = 1; $i <= 5; $i++) {
echo $lines[$i];
}
?>klappt jedoch nicht. Wie macht man es richtig?
Fehler:
* warning: file() [function.file]: open_basedir restriction in effect. File(/new/news.php) is not within the allowed path(s): (/var/www/web22/web/:/var/www/web22/log) in /var/www/web22/web/includes/common.inc(1352) : eval()'d code on line 2.
* warning: file(/new/news.php) [function.file]: failed to open stream: Operation not permitted in /var/www/web22/web/includes/common.inc(1352) : eval()'d code on line 2.
* warning: array_reverse() [function.array-reverse]: The argument should be an array in /var/www/web22/web/includes/common.inc(1352) : eval()'d code on line 3.- Anmelden oder Registrieren um Kommentare zu schreiben

Probier es doch mal
am 19.03.2008 - 16:09 Uhr
Probier es doch mal mit
<?php
include('/news.php');
$lines = name_der_funktion();
...
?>