Есть код и в нем выдает ошибку "Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in", ошибка идет в $text . Вот сам код :Код Code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 <html><body> <? if (!isset($_REQUEST['Save'])) {?> Button 1 : <input type=text name="button1" value=""><br> Button 2 : <input type=text name="button2" value=""><br> Button 3 : <input type=text name="button3" value=""><br> Button 4 : <input type=text name="button4" value=""><br> Button 5 : <input type=text name="button5" value=""><br> Button 6 : <input type=text name="button6" value=""><br> <input type=submit name="Save" value="Сохранить"> <? } else { $text = "<? $button1 = $_REQUEST['button2'] ; $button2 = $_REQUEST['button2'] ; $button3 = $_REQUEST['button3'] ; $button4 = $_REQUEST['button4'] ; $button5 = $_REQUEST['button5'] ; $button6 = $_REQUEST['button6'] ; ?>" ; $f=fopen("button.php", "w"); fwrite($f, '$text'); fclose($f); }?> </html></body>
Пользуйтесь специальным тегом [ PHP ] когда выкладываете PHP код: PHP: <?php if(!isset($_REQUEST['Save'])){ ?> Button 1 : <input type=text name="button1" value=""><br> Button 2 : <input type=text name="button2" value=""><br> Button 3 : <input type=text name="button3" value=""><br> Button 4 : <input type=text name="button4" value=""><br> Button 5 : <input type=text name="button5" value=""><br> Button 6 : <input type=text name="button6" value=""><br> <input type=submit name="Save" value="Сохранить"> <? } else { $text = '<? $button1 = $_REQUEST["button2"]; $button2 = $_REQUEST["button2"]; $button3 = $_REQUEST["button3"]; $button4 = $_REQUEST["button4"]; $button5 = $_REQUEST["button5"]; $button6 = $_REQUEST["button6"]; ?>'; $f=fopen('button.php', 'w'); fwrite($f, $text); fclose($f); } ?>