Jump to content
php.lv forumi

html tagu pievienoshana submiteejamam textam


43

Recommended Posts

shis skriptinjsh man submitee wysiwyg editoraa labotu tekstu (bet taa kaa editors aaraa izmet tikai ieksheejo html kodu -bez <html><head> utt.) tad man radaas ideja to pievienot manuaali submiteeshanas briidii. probleema vieniigi taada, ka nezinu, kaa iisti to panaakt.

 

<?php

$boonusa_tagi="<html>\n<head>\n";

 

if ($darbiba=="saglabat") {

$texts=stripslashes($HTTP_POST_VARS[html_editets]); //vai sheit $boonusa_tagi

if ($fp = @fopen ($fname, "wb"))

{

fwrite($fp, $texts); //it kaa sheit vajag pielikt tos $boonusa_tagi

fclose($fp);

print "<script TYPE=\"\">window.close();</SCRIPT>";

}

else

///IZMETAM ERRORU, PAR NEIERAKSTIISHANU///

$bladkom = "<font color='#CC0000'>".$error."</font>";

}

?>

Link to comment
Share on other sites

×
×
  • Create New...