Visualizzazione dei risultati da 1 a 5 su 5

Discussione: php e xhtml

  1. #1

    php e xhtml

    il mio problema è il seguente

    ho tolto un iframe, mettendo un div con css (seguendo un thread del forum)
    e all'interno di questo div attraverso il php decido quale pagina includere

    ogni link infatti è del genere
    link

    in questo modo riesco a determinare la pagina da includere

    ora tutto molto bello

    però se faccio la validazione w3c mi dice che non va bene
    questo perchè ho dovuto mettere la pagina come index.php

    ora come faccio a tenere la pagina index.html e però ad utilizzare il php???

    Grazie a chi mi aiuterà

  2. #2
    Mi posti l'errore del W3C?

    Mi sembra strano.
    Think global, act local.

  3. #3
    allora

    se faccio validate by Url e metto http://botte.altervista.org/
    mi dice:
    Sorry, I am unable to validate this document because on line 25, 36 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication.


    se inveco faccio validate by File Upload e carco index.php
    mi dice:
    Sorry, I am unable to validate this document because its content type is application/octet-stream, which is not currently supported by this service.

    The Content-Type field is sent by your web server (or web browser if you use the file upload interface) and depends on its configuration. Commonly, web servers will have a mapping of filename extensions (such as ".html") to MIME Content-Type values (such as text/html).

    That you received this message can mean that your server is not configured correctly, that your file does not have the correct filename extension, or that you are attempting to validate a file type that we do not support yet. In the latter case you should let us know that you need us to support that content type (please include all relevant details, including the URL to the standards document defining the content type) using the instructions on the Feedback Page.

    infine se copio il contenuto di index.php nel validatore diretto
    mi dice:
    Below are the results of checking this document for XML well-formedness and validity.

    1. Warning Line 21 column 2: processing instruction does not start with name.

    ?>


    2. Warning Line 29 column 2: processing instruction does not start with name.

    ?>


    3. Error Line 36 column 63: document type does not allow element "a" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.

    ...ss="ROLL" href="index.php?id=un" onclick="this.blur()">+ Università</a>

    The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

    One possible cause for this message is that you have attempted to put a block-level element (such as "

    " or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").



    il file index.php è il seguente:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title> Botte's Site </title>
    <link rel="stylesheet" type="text/css" href="style.css"/>
    </head>
    <body>

    <div class="iframe">
    <?
    if ($id=="un"){
    include("universita.php");
    }else {
    if ($id=="li"){
    include("link.php");
    }else {
    if ($id=="ub"){
    include("ubuntu.php");
    }else {
    ?>









    Benvenuto nel mio sito!


    Innanzitutto ci tengo a fare una precisione sul nome del sito: si chiama white angel non perchè mi considero un angelo, semplicemente tanto tempo fa (qualche anno) mi piaceva molto una copertina dei Vision Divine (dall'omonimo album Vision Divine) che raffigurava un angelo bianco e così decisi d'iscrivermi ad un forum con il nick whiteangel che ora uso praticamente ovunque (su internet, non vado a fare la spesa vestito da angelo :P).

    </p>
    <?
    }}}
    ?>
    </div>

    <div class="sotto">


    Per qualsiasi consiglio, opinione, riflessione mandami un' email

    Sito ottimizzato per browser basati su mozilla (per esempio Firefox) alla risoluzione 1024x768</p>
    </div>
    + Università
    + Ubuntu
    + Citazioni
    + Link
    Home-Page


    </body>

    </html>

  4. #4
    Utente di HTML.it L'avatar di Francis87
    Registrato dal
    Jun 2003
    Messaggi
    5,970
    ti manca
    codice:
    <?xml version="1.0" encoding="utf-8" ?>
    che setta l'encoding della pagina.

    poi hai caratteri che non possono stare così sulla pagina, e devono essere corretti (sostituiti) con le rispettive entità. & diventa & a m p ; per esempio.
    così anche tutte le lettere accentate: è diventa & e grave ; mentre é diventa & a acute ;

    poi hai del codice php che non viene interpretato nella pagina..... io comincerei da questo!
    Heaven's closed. Hell sold out.

    Linux 2.6.26-2-amd64
    Debian squeeze

  5. #5
    Originariamente inviato da Francis87
    ti manca
    codice:
    <?xml version="1.0" encoding="utf-8" ?>
    che setta l'encoding della pagina.

    poi hai caratteri che non possono stare così sulla pagina, e devono essere corretti (sostituiti) con le rispettive entità. & diventa & a m p ; per esempio.
    così anche tutte le lettere accentate: è diventa & e grave ; mentre é diventa & a acute ;

    poi hai del codice php che non viene interpretato nella pagina..... io comincerei da questo!
    se metto <?xml version="1.0" encoding="utf-8" ?>
    il php mi da un errore alla prima riga:

    Parse error: syntax error, unexpected T_STRING in /membri2/botte/index.php on line 1

    ...quindi non me lo fa mettere

    per i caratteri ora sistemo

    in che senso ho del codice php che non viene interpretato nella pagina?

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.