No te entiendo, podrias ser un poquito mas especifico con la segunda idea porfa? o de que modo puedo modificar mi codigo php para que me deje postear html y aplicarlo? este es mi php:
Código PHP:
Ver original<?php
$file_name = "events.txt";
$post_sep = "<###>";
class writePosts {
function inputPost($inputCodeContainer) {
global $file_name, $post_sep;
$self = $_SERVER['PHP_SELF'];
$inputCodeContainer = $inputCodeContainer;
$fh = fopen($file_name, "r+");
fwrite($fh, $inputCodeContainer.$post_sep);
echo "<script>window.location = '$self'; </script>";
}
function getPost(){
if (isset ($_POST['inputCodeContainer'])) { $this->inputPost($_POST[inputCodeContainer]);
}
}
}
class readPosts{
function readAll(){
global $file_name, $post_sep;
$fh = fopen($file_name, "r");
$i = 0;
$counteach = count($each);
while($i < $counteach - 1){
$post_info = explode($post_sep, $each[$i]); $this->outPost($post_info[0], $post_info[1], $post_info[2]);
$i++;
}
}
function outPost($inputCodeContainer){
$inputCodeContainer = $inputCodeContainer;
echo "$inputCodeContainer";
}
}
$write = new writePosts;
$read = new readPosts;
$write->getPost();
?>