Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- print('<form action="chat.php" method="post" ENCTYPE="multipart/form-data">');
- print('<input type="text" name="senten" size="40">');
- print('<input type="file" name="pict">');
- print('<input type="submit" name="submit" value="say">');
- print('</form>');
- if (isset($submit)):
- $file=fopen("chatpg.html", "r");
- $data=fread($file,4000);
- fclose($file);
- $file=fopen("chatpg.html", "w+");
- fputs($file,$senten.'<br>'); //Дописать строку в конец файла
- if ($pict != "none")
- {
- copy($pict,"C:/Apache Group/Apache/htdocs/user/".$pict_name);
- unlink($pict);
- fputs($file,'<img src="/user/'.$pict_name.'">');
- }
- //endif
- fputs($file,$data);
- fclose($file);
- endif;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement