SetaPDF
-


Hinweise


Antwort
 
LinkBack Themen-Optionen Thema durchsuchen Thema bewerten
Alt 07.05.2003, 18:44   #1
TP-Junior
 
Registriert seit: May 2003
fränzel macht alles soweit korrekt

fehler im code?


HI LEUTZ!

ich habe versucht einen kalender zu basteln, in den sich auch user eintragen können, was sogar funktioniert hat,
allerdings klappt das löschen und bearbeiten irgendwie nicht ...
Weiß / sieht jemand (m)einen Fehler?

function del_event( $id2del )
{
GLOBAL $EFILE;
$temp_file = "temp_filed.txt";
$temp_h = fopen($temp_file,"w+");
$file_array = file($EFILE);
foreach($file_array as $fline)
{
$line_length = strlen($fline);
if($line_length > 30)
{
list($fid,$fdatestamp,$fstimestamp,$fetimestamp,$flocation,$fdescr) = explode("|",$fline);
if($fid != $id2del)
{
fputs($temp_h,$fline);
}
}
}
fclose($temp_h);
unlink($EFILE);
rename($temp_file,$EFILE);

return 1;
}

function purge_old( $boundstamp )
{
GLOBAL $EFILE;
$tempfile = "temp_file_purge.txt";
$temph = fopen($tempfile,"w+");
$file_array = file($EFILE);
foreach($file_array as $fline)
{
$line_length = strlen($fline);
if($line_length > 30)
{
list($fid,$fdatestamp,$fstimestamp,$fetimestamp,$flocation,$fdescr) = explode("|",$fline);
if($fdatestamp >= $boundstamp)
{
fputs($temph,$fline);
}
}
}
fclose($temph);
unlink($EFILE);
rename($tempfile,$EFILE);

return 1;
}

function mod_event( $oldid, $newline )
{
GLOBAL $EFILE;
$temp_file = "temp_filed.txt";
$temp_h = fopen($temp_file,"w+");
$file_array = file($EFILE);
foreach($file_array as $fline)
{
$line_length = strlen($fline);
if($line_length > 30)
{
list($fid,$fdatestamp,$fstimestamp,$fetimestamp,$flocation,$fdescr) = explode("|",$fline);
if($fid != $oldid)
{
fputs($temp_h,$fline);
}
}
}
fputs($temp_h, "\r\n".$newline);
fclose($temp_h);
unlink($EFILE);
rename($temp_file,$EFILE);

return 1;
}

function get_event( $id )
{
GLOBAL $EFILE;
$file_array = file($EFILE);
foreach($file_array as $line)
{
$line_length = strlen($line);
if($line_length > 30)
{
$chunked = explode("|",$line);
$fid = $chunked[0];
if($fid == $id)
{
//array_push($day_array,$line);
$foundline = trim($line);
return $foundline;
}
}
}
return 0;
}

Geändert von fränzel (07.05.2003 um 19:32 Uhr).
fränzel ist offline   Mit Zitat antworten


Alt 07.05.2003, 19:04   #2
TP-Junior
 
Registriert seit: May 2003
fränzel macht alles soweit korrekt
Laut Fehlermeldung sind keine Schreibrechte vorhanden, ich habe allerdings Chmod 777 eingestellt. Die Datei liegt im selben Ordner wie calvar.php welche oben zu sehen ist ...
Ich versteh nur noch Bahnhof! :-(

Warning: fopen("temp_filed.txt", "w+") - Permission denied in /www/hosting/data/47282d48f62e19684815021f68ee44e0/geburtstag/include/calvars.inc on line 117

Warning: Supplied argument is not a valid File-Handle resource in /www/hosting/data/47282d48f62e19684815021f68ee44e0/geburtstag/include/calvars.inc on line 127

Warning: Supplied argument is not a valid File-Handle resource in /www/hosting/data/47282d48f62e19684815021f68ee44e0/geburtstag/include/calvars.inc on line 127

Warning: Supplied argument is not a valid File-Handle resource in /www/hosting/data/47282d48f62e19684815021f68ee44e0/geburtstag/include/calvars.inc on line 127

Warning: Supplied argument is not a valid File-Handle resource in /www/hosting/data/47282d48f62e19684815021f68ee44e0/geburtstag/include/calvars.inc on line 127

Warning: Supplied argument is not a valid File-Handle resource in /www/hosting/data/47282d48f62e19684815021f68ee44e0/geburtstag/include/calvars.inc on line 127

Warning: Supplied argument is not a valid File-Handle resource in /www/hosting/data/47282d48f62e19684815021f68ee44e0/geburtstag/include/calvars.inc on line 127

Warning: Supplied argument is not a valid File-Handle resource in /www/hosting/data/47282d48f62e19684815021f68ee44e0/geburtstag/include/calvars.inc on line 131

Warning: Unlink failed (Permission denied) in /www/hosting/data/47282d48f62e19684815021f68ee44e0/geburtstag/include/calvars.inc on line 132

Warning: Rename failed (No such file or directory) in /www/hosting/data/47282d48f62e19684815021f68ee44e0/geburtstag/include/calvars.inc on line 133
fränzel ist offline   Mit Zitat antworten
Alt 07.05.2003, 23:40   #3
TP-Specialist
 
Benutzerbild von mike
 
Registriert seit: Jan 2002
Ort: TP/Dynamik
mike bringt sich richtig ein
ist das bei dir lokal oder schon am hoster?
wenn hoster, dann schau mal ob der auf save-mode konfiguriert ist.
und um der frage vorzubeugen, was save mode bedeutet: bitte die suche benutzen, das hatten wir diesen monat schon ein- zweimal.
__________________
Gehelft? Hier kannst du dich bedanken.

mike
mike ist offline   Mit Zitat antworten
Alt 08.05.2003, 08:36   #4
TP-Junior
 
Registriert seit: May 2003
fränzel macht alles soweit korrekt
o.k. ich frage nicht was save mode ist, aber kann mir wer sagen wie ich das ändere (tripod)? Wäre echt klasse ...

(habe gesucht und gefunden, das Problem löste sich allerdings ohne näher darauf einzugehen ... )

Geändert von fränzel (08.05.2003 um 08:57 Uhr).
fränzel ist offline   Mit Zitat antworten
Antwort

  Aktuelles Thema
  TP Hilfe Forum > Web-Editoren & Coding > Traum-Dynamik
fehler im script? fehler im script?
« Text aus Datei als Mail verschicken | javascript / php kombination - flash plugin »

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 
Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an
Gehe zu


Alle Zeitangaben in WEZ +2. Es ist jetzt 03:29 Uhr.

Powered by: vBulletin Version 3.7 (Deutsch)
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. / Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.
Traum-Projekt.com | Suchen | Archiv | Impressum | Kontakt | | | Nach oben |



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67