Jump to content

Introduceti Din Php Un Text Intr-un Fisier .txt


Recommended Posts

1. Deschideti Notepad si salvati fisierul sub numele de text.txt

2. Creati un fisier .php si plasati codul de mai jos in el.

if($_POST['update']) {
$newmsg = stripslashes($_POST['message']);
$file = fopen("text.txt","r+");
$writedate = fwrite($file,$newmsg);
$messages = fopen("text.txt","r+");
$message = fread($messages,100000);

<form action="<? $php_self ?>" method="post">
<textarea name="message" rows="4" cols="40"><?=$message?>

<input type="submit" name="update" value="Update" />

3. Uploadati ambele fisiere pe host, [color=red]dati [b]CHMOD 777[/b] pe fisierul [b]text.txt[/b][/color]

Dupa ce apasati pe butonul update tot ce e scris in textbox va aparea in text.txt

Te-ai inregistrat? Ne-ar placea sa te prezinti.

Cum pot sustine forumul?
Cumpara de la eMag folosind acest link.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.