Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    Problema con la creazione di una nuova pagina con php

    Ciao a tutti, è da giorni che mi imbatto in questo problema....
    non capisco perchè altervista mi segnala errore queste righe di codici.

    Codice PHP:
    <?php if (isset($_POST["crea"])) {     $file "pagina1.html";     $codice " <html><head><meta http-equiv="Content-Type" content="text/htmlcharset=UTF-8"><title>CryrTex</title><meta name="author" content="Murgolo Christian"><meta name="categories" content="Social"><link href="CryrTex.css" rel="stylesheet" type="text/css"><link href="1.css" rel="stylesheet" type="text/css"><script type="text/javascript" src="jquery-1.11.1.min.js"></script></head><body><div id="wb_ClipArt2" style="position:absolute;left:0px;top:758px;width:1348px;height:63px;z-index:0;"><img src="images/img0066.png" id="ClipArt2" alt="" style="width:1348px;height:63px;"></div><div id="wb_Shape1" style="position:absolute;left:137px;top:770px;width:27px;height:26px;z-index:1;"><img src="images/img0067.png" id="Shape1" alt="" style="width:27px;height:26px;"></div><div id="wb_Image1" style="position:absolute;left:137px;top:769px;width:17px;height:17px;z-index:2;"><img src="images/2.png" id="Image1" alt=""></div><div id="wb_Text1" style="position:absolute;left:194px;top:775px;width:90px;height:34px;z-index:3;text-align:left;"><span style="color:#FFFFFF;font-family:Arial;font-size:11px;"><strong>Telefono</strong></span><span style="color:#FFFFFF;font-family:Arial;font-size:16px;"><strong><br></strong></span><span style="color:#FFFFFF;font-family:Arial;font-size:8px;">I servizi telefonici non sono ancora attivi</span></div><div id="wb_Text2" style="position:absolute;left:454px;top:779px;width:137px;height:24px;z-index:4;text-align:left;"><span style="color:#FFFFFF;font-family:Arial;font-size:11px;"><strong>Contattami</strong></span><span style="color:#FFFFFF;font-family:Arial;font-size:8px;"><strong><br></strong>cryrtex@gmail.com</span></div><div id="wb_Text3" style="position:absolute;left:720px;top:777px;width:94px;height:14px;z-index:5;text-align:left;"><span style="color:#FFFFFF;font-family:Arial;font-size:11px;"><strong>Seguimi su</strong></span></div><div id="wb_Text4" style="position:absolute;left:992px;top:775px;width:182px;height:28px;z-index:6;text-align:left;"><span style="color:#FFFFFF;font-family:Arial;font-size:11px;"><strong>Sito creato da<br>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Murgolo Christian</strong></span></div><div id="wb_Image5" style="position:absolute;left:720px;top:796px;width:16px;height:16px;z-index:7;"><img src="images/8.png" id="Image5" alt=""></div><div id="Html1" style="position:absolute;overflow:hidden;left:0px;top:38px;width:106px;height:62px;z-index:8"><script language=JavaScript type="text/javascript">//Disable right mouse click Scriptvar message="Funzione Disabilitata!";function clickIE4(){if (event.button==2){alert(message);return false;}}
    function clickNS4(e){if (document.layers||document.getElementById&&!document.all){if (e.which==2||e.which==3){alert(message);return false;}}}
    if (
    document.layers){document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS4;}else if (document.all&&!document.getElementById){document.onmousedown=clickIE4;}
    document.oncontextmenu=new Function("alert(message);return false")</script></div><div id="wb_Shape4" style="position:absolute;left:404px;top:777px;width:27px;height:26px;z-index:9;"><img src="images/img0068.png" id="Shape4" alt="" style="width:27px;height:26px;"></div><div id="wb_Image2" style="position:absolute;left:395px;top:776px;width:19px;height:19px;z-index:10;"><img src="images/3.png" id="Image2" alt=""></div><div id="wb_Shape5" style="position:absolute;left:931px;top:777px;width:27px;height:26px;z-index:11;"><img src="images/img0069.png" id="Shape5" alt="" style="width:27px;height:26px;"></div><div id="wb_Shape2" style="position:absolute;left:662px;top:775px;width:27px;height:26px;z-index:12;"><img src="images/img0070.png" id="Shape2" alt="" style="width:27px;height:26px;"></div><div id="wb_Image4" style="position:absolute;left:654px;top:774px;width:17px;height:17px;z-index:13;"><img src="images/7.png" id="Image4" alt=""></div><div id="wb_Image3" style="position:absolute;left:919px;top:773px;width:22px;height:22px;z-index:14;"><img src="images/5.png" id="Image3" alt=""></div><div id="wb_ClipArt3" style="position:absolute;left:0px;top:38px;width:1348px;height:62px;z-index:15;"><img src="images/img0071.gif" id="ClipArt3" alt="" style="width:1348px;height:62px;"></div><div id="wb_TextArt2" style="position:absolute;left:320px;top:46px;width:121px;height:41px;z-index:16;"><img src="images/img0072.png" id="TextArt2" alt="CryrTex" title="CryrTex" style="width:121px;height:41px;"></div><div id="wb_Image7" style="position:absolute;left:164px;top:2px;width:128px;height:128px;z-index:17;"><img src="images/icon_2.png" id="Image7" alt=""></div><div id="wb_CssMenu2" style="position:absolute;left:931px;top:59px;width:348px;height:28px;z-index:18;"><ul><li class="firstmain"><a href="./../Home.html" target="_self">HOME</a></li><li><a href="./../About.html" target="_self">About</a></li><li><a href="./../Faq.html" target="_self">Faq</a></li><li><a href="./../Contattaci.html" target="_self">Contattaci</a></li></ul><br></div><img src="images/img0073.jpg" id="Banner1" alt="CryrTex" style="border-width:0;position:absolute;left:1061px;top:108px;width:287px;height:64px;z-index:19;"><img src="images/img0074.jpg" id="Banner2" alt="CryrTex" style="border-width:0;position:absolute;left:1061px;top:263px;width:287px;height:233px;z-index:20;"><div id="wb_Text5" style="position:absolute;left:342px;top:285px;width:528px;height:16px;z-index:21;text-align:left;"><span style="color:#000000;font-family:Arial;font-size:13px;"><?php echo('' $_POST['TextArea1']);?></span></div><div id="wb_Shape3" style="position:absolute;left:849px;top:240px;width:44px;height:21px;z-index:22;"><img src="images/img0075.png" id="Shape3" alt="" style="width:44px;height:21px;"></div><div id="wb_Text6" style="position:absolute;left:867px;top:242px;width:12px;height:16px;z-index:23;text-align:left;"><span style="color:#000000;font-family:Arial;font-size:13px;">0</span></div><div id="wb_Shape6" style="position:absolute;left:793px;top:240px;width:44px;height:21px;z-index:24;"><img src="images/img0076.png" id="Shape6" alt="" style="width:44px;height:21px;"></div><div id="wb_Text7" style="position:absolute;left:811px;top:242px;width:12px;height:16px;z-index:25;text-align:left;"><span style="color:#000000;font-family:Arial;font-size:13px;">0</span></div></body></html>;     $fo = fopen($file, "w");     fwrite($fo, $codice);     fclose($fo); 
     ?>
    In poche parole.. quando riceve il click di un button dovrebbe creare una pagina... ma il problema e che altervista mi segnala che ci sono degli errori e di conseguenza non mi crea nessuna pagina... come mai? come posso risolvere?

  2. #2
    Moderatore di PHP L'avatar di Alhazred
    Registrato dal
    Oct 2003
    Messaggi
    12,505
    Dire quali siano gli errori restituiti aiuterebbe, così come aiuterebbe un codice correttamente formattato, così è impossibile da leggere.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.