Jump to content
Fórum Script Brasil
  • 0

(Resolvido) Ajuda edição



Olá, alguém poderia me ensinar como faço para editar um texto dinamicamente em php?

ex: fazer com que no painel do admin se possa editar o texto que aparece na parte x do site

se alguém puder me enviar um turorial ensinando como fazer ou algo do tipo ficarei grato pois não encontrei na net

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Consegui pode feixar o tópico

Aqui pra quem quiser:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">


<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>Editor de txt</title>




$fn = "ejemplo.txt";

if (isset($_POST['content']))


$content = stripslashes($_POST['content']);

$fp = fopen($fn,"w") or die ("Error al abrir el archivo");


fclose($fp) or die ("Error al cerrar el archivo");



<div style=width:950px; text-align: center; margin: auto; background-color: #F0F0F0; border: 1px solid #B3B9D5; border-color: #B3B9D5; padding: 15px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #717CB0; font-size: 14px;">

Editor de archivos <strong>txt

</strong><br /><br />

<form action="<?php echo $_SERVER["PHP_SELF] ?>" method="post">

<textarea rows="25" cols="110" name="content"><?php readfile($fn); ?></textarea>

<br />

<br />

<input type="submit" value=" Guardar los cambios ">


<br />






Aqui eu edito
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.

Answer this question...

×   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.


  • Forum Statistics

    • Total Topics
    • Total Posts
  • Create New...