hi and sorry for my English
i write an small application by PHP that read/write html/or/txt file by simple form.
.
its worked as well until server updated by litespeed protection method.
.
here it is my code ------> do.php
and by this form i get data to store into "xx.txt" file :
its will accept all character or html tags by this form and will stored into TXT file, but when i want to save <script> character alone or middle html tags, litespeed return error
403 Forbidden
" Access to this resource on the server is denied!"
Powered By LiteSpeed Web Server
....
.
this 403 error will not reported apache error logs.
how can i resolve this problem ?!
thanks for your attention.
i write an small application by PHP that read/write html/or/txt file by simple form.
.
its worked as well until server updated by litespeed protection method.
.
here it is my code ------> do.php
PHP:
<?php
// set file to read
$filename = "xx.txt";
$newdata = $_POST['newd'];
if ($newdata != '') {
// open file
$fw = fopen($filename, 'w') or die('Could not open file!');
// write to file
// added stripslashes to $newdata
$fb = fwrite($fw,stripslashes($newdata)) or die('Could not write to file');
// close file
fclose($fw);
}
?>
PHP:
<?php
$filename = "xx.txt";
$fh = fopen($filename, "r") or die("Could not open file!");
$data = fread($fh, filesize($filename)) or die("Could not read file!");
?>
<html>
<form action='do.php' method= 'post' >
<textarea name='newd' cols='100%' rows='50'><?php print $data ?> </textarea>
<input type='submit' value='Save Data'>
</form>
</html>
403 Forbidden
" Access to this resource on the server is denied!"
Powered By LiteSpeed Web Server
....
.
this 403 error will not reported apache error logs.
how can i resolve this problem ?!
thanks for your attention.