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

    Errore "The requested URL was not found on this server"

    Buongiorno a tutti,

    Questo seguente codice PHP mi da' questo errore "Therequested URL was not found on this server" che dipende dal fatto che invece di inserire nel "Iframe src" = './inpaghome/catmonol.php'devo inserire la variabile array "$newsInHomeSx" o
    "$newsInHomeDx" (che ha esattamentelo stesso valore). Il risulato della variabile stringa e' pero' diverso tanto e' vero che non vienetrovato il file php.

    Sicuramente sbaglio qualcosa ma non riesco a capire.

    Ringrazio per l'aiuto.



    Codice PHP:
    if ($titpag== 'Home') {
      
      
    $newsInHomeSx = array('./inpaghome/catmonol.php');
      
    $newsInHomeDx = array('./inpaghome/supcollet.php');
      
    $quantenewsSx count($newsInHomeSx);
        
                echo 
    "
      
      <DIV STYLE='position:absolute; margin-left:12.5cm; margin-top:9.7cm; line-height: 5px;'>
      <iframe src='./inpaghome/supcollet.php' width='450' scrolling='no' frameborder='0'>
      </iframe>
      </DIV>
      <iframe src='./inpaghome/catmonol.php' width='450' scrolling='no' frameborder='0'>
      </iframe>
      
      
      for(
    $i=0;$i<$quantenewsSx;$i++){
     
     
      <DIV STYLE='position:absolute; margin-left:4.5cm;'>
      <p><img src='images/filetto_separatore.jpg' width='650' height='1' alt='separatore'/></p>
      </DIV>
      
      
      <DIV STYLE='position:absolute; margin-left:12.5cm; line-height: 5px;'>
      <iframe src=
    $newsInHomeDx[$i]; width='450' scrolling='no' frameborder='0'>
      </iframe>
      </DIV>
      
      
      <iframe src=
    $newsInHomeSx[$i]; width='450' scrolling='no' frameborder='0'>
      </iframe>
      
                                      }
                                                                           }
    "


  2. #2
    Un for all'interno di un echo mi mancava!
    "Mai discutere con un idiota. Ti trascina al suo livello e ti batte con l'esperienza." (Oscar Wilde)

  3. #3
    ok provo ad inserire il ciclo For fuori da echo e verifico.

    Ho modificato il codice come segue [inserendo: if(isset($newsInHomeDx[$i])) per evitare il Notice: Offset]:


    <?php

    if ($titpag== 'Home') {

    $newsInHomeSx = array('./inpaghome/catmonol_1.php', './inpaghome/Allcatsup_1.php', './inpaghome/nat_1.php', './inpaghome/150ll_1.php', './inpaghome/supUSA_1.php', './inpaghome/heavy_1.php', './inpaghome/forcella_1.php', './inpaghome/iso_1.php');
    $newsInHomeDx = array('./inpaghome/supcollet_2.php');
    $quantenewsSx = count($newsInHomeSx);

    echo "

    <DIV STYLE='position:absolute; margin-left:12.5cm; margin-top:9.7cm; line-height: 5px;'>
    <iframe src='./inpaghome/supcollet_2.php' width='450' scrolling='no' frameborder='0'>
    </iframe>
    </DIV>
    <iframe src='./inpaghome/catmonol_1.php' width='450' scrolling='no' frameborder='0'>
    </iframe>
    ";

    for($i=0;$i<$quantenewsSx;$i++){

    echo "

    <DIV STYLE='position:absolute; margin-left:4.5cm;'>
    <p><img src='images/filetto_separatore.jpg' width='650' height='1' alt='separatore'/></p>
    </DIV>
    ";

    if(isset($newsInHomeDx[$i])) {

    echo "
    <DIV STYLE='position:absolute; margin-left:12.5cm; line-height: 5px;'>
    <iframe src=$newsInHomeDx[$i]; width='450' scrolling='no' frameborder='0'>
    </iframe>
    </DIV>
    ";
    }

    echo "
    <iframe src=$newsInHomeSx[$i]; width='450' scrolling='no' frameborder='0'>
    </iframe>
    ";

    }
    }

    ?>
    Ho il seguente errore: "Not Found. The requested URL /prova/inpaghome/catmonol_1.php; was not found on this server".

    Grazie.
    Ultima modifica di ans66; 15-12-2013 a 13:53

  4. #4
    Ho modificato ulteriormente il codice. Non ho piu' l'errore perche' il file php viene trovato. Comunque non riesco ad ottenere l'istruzione <DIV .... </DIV>:

    <?php

    if ($titpag== 'Home') {
    $fl0_1=getcwd().'/inpaghome/Allcatsup_1.php';
    $fl0_2=getcwd().'/inpaghome/ay_2.php';


    $newsInHomeSx = array($fl0_1, );
    $newsInHomeDx = array($fl0_2);
    $quantenewsSx = count($newsInHomeSx);


    echo "

    <DIV STYLE='position:absolute; margin-left:12.5cm; margin-top:9.7cm; line-height: 5px;'>
    <iframe src='./inpaghome/supcollet_2.php' width='450' scrolling='no' frameborder='0'>
    </iframe>
    </DIV>
    <iframe src='./inpaghome/catmonol_1.php' width='450' scrolling='no' frameborder='0'>
    </iframe>
    ";

    for($i=0;$i<$quantenewsSx;$i++){

    echo "

    <DIV STYLE='position:absolute; margin-left:4.5cm;'>
    <p><img src='images/filetto_separatore.jpg' width='650' height='1' alt='separatore'/></p>
    </DIV>
    ";

    if(isset($newsInHomeDx[$i])) {

    echo "
    <DIV STYLE='position:absolute; margin-left:12.5cm; line-height: 5px;'>
    <iframe src=$newsInHomeDx[$i]; width='450' scrolling='no' frameborder='0'>
    </iframe>
    </DIV>
    ";
    }

    echo "
    <iframe src=$newsInHomeSx[$i]; width='450' scrolling='no' frameborder='0'>
    </iframe>
    ";

    }
    }

    ?>

Tag per questa discussione

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.