Ich hab grad probiert das ganze Script auf die .php Dateien in meinem /pub/ Ordner anzuwenden. Die .php Dateien können auch ohne Probleme geöffnet werden, aber ich kann sie leider nicht bearbeiten. Zuerst hab ich gedacht es liegt daran dass die Dateien keine Schreibrechte haben (CHMOD 777), aber als ich dann noch die Fehlermeldung
bekommen hab, wurde ich doch ein bisschen verwirrt.
Hab das dann mal im PHP Manual nachgeschlagen, doch darauch werd ich auch nicht schlau.
Ich tippe einfach mal dass sich der Befehl file_put_contents() ganz einfach nur auf .txt Dateien anwenden lässt.
Merci again,
A2k
--
The problem with America is stupidity.
I'm not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself?
----
Arguing with the moderators is like shaking your fist at God. There's nobody there; and if there is, he's not listening. And if he's listening, all you're doing is pissing him off.
Steht doch drin. Zeig mal deinen aktuellen Code. Da müsste nur ein Parameter geben werden sein. Vllt. aber auch hat sich in dein Script ein Fehler eingeschlichen der die Parameter verfälscht.
Es ist im Grunde 1:1 dasselbe Script wie vorher, nur dass ich eben nicht aufs "Scripts" Verzeichnis, sondern gleich direkt auf die Dateien in meinem /pub/ Ordern zugreife.
--
The problem with America is stupidity.
I'm not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself?
----
Arguing with the moderators is like shaking your fist at God. There's nobody there; and if there is, he's not listening. And if he's listening, all you're doing is pissing him off.
Merkst was? Dann deine Fehlermeldung "file_put_contents() expects at least 2 parameters,..."
Du gibst nur einen Parameter an, nämlich in welche Datei er speichern soll. Es fehlt noch das ,$_POST['text'] also das, was er da hineinspeichern soll, gelle!
Hier liegt der Fehler!
Du hast vielleicht wieder zu schnell Suchen und ersetzen gespielt, denn diese Funktion sieht aus wie die file_get_contents() später im Text.
file_put_contents() hier braucht zwei Werte! Zuerst den Pfad zur Datei in die du alles schreibst und danach den Inhalt, den du schreibst. Außerdem darf file_put_contents() keine Adresse im WWW sein sondern muss dem Dateipfad des Servers entsprechen.
The problem with America is stupidity.
I'm not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself?
----
Arguing with the moderators is like shaking your fist at God. There's nobody there; and if there is, he's not listening. And if he's listening, all you're doing is pissing him off.