Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 13
  1. #1
    Utente di HTML.it L'avatar di vikey89
    Registrato dal
    Apr 2009
    Messaggi
    333

    Problema con gestbokk in php

    Ragazzi mi potete aiutare?praticamente ho scaricato un guestbook su Html.it, per l'esatezza questo, creo la tabella con il file Run.sql e inserisco il tutto sul mio sito, solo che appena prova a vedere il risultato mi da questo errore:
    Codice PHP:
    Fatal errormain() [function.require]: Failed opening required 'http://allevamentonaxos.altervista.org/config.php' (include_path='.:'in /membri/allevamentonaxos/index.php on line 3 
    Come posso procedere?
    <br />
    http://www.vikeydesign.it
    -----------------------------------
    <?php echo "Hello World!"; ?>

  2. #2
    Utente di HTML.it L'avatar di neroux
    Registrato dal
    Aug 2009
    Messaggi
    1,973
    Sembra che sta provando leggere la config tramite la rete .... hai indicato il config file da qualche parte? Prova di mettere solo config.php invece di http://allevamentonaxos.altervista.org/config.php

    www.sitemeer.com » Quando un sito pare irraggiungibile

    Se ti piace ci puoi trovare anche su Facebook

  3. #3
    Utente di HTML.it L'avatar di vikey89
    Registrato dal
    Apr 2009
    Messaggi
    333
    si ho provato anche in quel modo, ma mi da sempre lo stesso errore.. non è che devo configurare il file config.php tipo:
    localhost:
    databse :
    etc..

    non so perchè fa cosi!!
    <br />
    http://www.vikeydesign.it
    -----------------------------------
    <?php echo "Hello World!"; ?>

  4. #4
    Utente di HTML.it L'avatar di neroux
    Registrato dal
    Aug 2009
    Messaggi
    1,973
    Puoi postare la riga 3 di index.php?

    www.sitemeer.com » Quando un sito pare irraggiungibile

    Se ti piace ci puoi trovare anche su Facebook

  5. #5
    Utente di HTML.it L'avatar di vikey89
    Registrato dal
    Apr 2009
    Messaggi
    333
    Allora inserisco tutta la index.php cosi vedi se c'è qualche errore...

    Codice PHP:
    <?php
    require('http://allevamentonaxos.altervista.org/config.php'); 
    $result mysql_query('SELECT `id`, `name`, `message`, `time` FROM `posts` ORDER BY id DESC'); 
    ++
    $queries

    function 
    splitString($string) { 
    $stringArray explode(' '$string); 
    foreach (
    $stringArray as $word) { 
    $newString .= chunk_split($word50);
     } 
    return 
    $newString
    }
     
    ?>
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Ajax PHP/MySQL Guestbook</title> 
    <link href="http://allevamentonaxos.altervista.org/style.css" rel="stylesheet" type="text/css" /> 
    <script type="text/javascript"> 
    function toggle(str, str2) { 
    document.getElementById(str).style.display = 'none'; document.getElementById(str2).style.display = 'block'; 

    function checkPost() { 
    var ajax = new XMLHttpRequest(); 
    ajax.onreadystatechange=function() { 
    if (ajax.readyState==4) { 
    var buffer = document.getElementById('messageWrap').innerHTML;
    if (ajax.responseText.search('&&error') != -1) { 
    document.getElementById('error').innerHTML = ajax.responseText;
     } else { 
    document.getElementById('messageWrap').innerHTML = ajax.responseText + buffer; document.getElementById('error').innerHTML = ''; 
       } 
      } 
    }
     ajax.open('GET', 'http://allevamentonaxos.altervista.org/check.php?name=' + document.getElementById('name').value + '&message='
    + document.getElementById('message').value, true); 
    ajax.send(null); } 
    </script> 
    </head> 
    <body> 
    <div id="header"> Ajax PHP/MySQL Guestbook </div> 
    <div id="main"> 
    <div id="addMessage"> 


    [url="javascript:toggle('addMessage', 'inputBox');"]Add a message![/url]</p>
     </div> 
    <div id="inputBox"> <form action="" method="post" name="go"> 

    <input id="name" name="name" type="text" /> <label for="name">Name</label>*</p> 


    <textarea id="message" name="message" type="textarea" cols="60" rows="3"></textarea> 
    <label for="message">Message</label>*</p>
     

    <input type="button" value="Post" onclick="javascript:checkPost()" /> * = Required <div id="notice"></div></p> 
    </form> 
    </div> 
    <div id="error"></div> 
    <div id="messageWrap">
     <?php 
    if (mysql_num_rows($result) == 0) { 
    ?> 
    <div class="messageBox" style="padding: 10px 10px;">
     No messages have been posted. Why not post one! 
    </div> 
    <?php 
    } else { 
    while (
    $row mysql_fetch_assoc($result)) { 
    ?> 
    <div class="messageBox"> 
    <div class="name"> 
    Posted by [b]<?php echo stripslashes(htmlentities($row['name'])) ?>[/b] on <?php echo date('d/m/Y'$row['time']) . ' at ' date('H:i:s'$row['time']) . ($_SESSION['admin'] === ' [[url="http://allevamentonaxos.altervista.org/delete.php?id=' $row['id'] . '"]Delete[/url]]' ''?> 
    </div> 
    <div class="message">
     

    <?php echo splitString(stripslashes(htmlentities($row['message']))) ?></p>
     </div> 
    </div> 
    <?php 
      


    ?> 
      </div> 
    </div> 
    <div id="footer">
     [url="http://ehwtf.com/guestbook"]Ajax PHP/MySQL Guestbook[/url] | [url="http://allevamentonaxos.altervista.org/login.php"]Log in[/url] | Execution time: <?php echo (microtime() - $start?> seconds. MySQL Queries: <?php echo $queries ?>
     </div> 
    </body> 
    </html>
    <br />
    http://www.vikeydesign.it
    -----------------------------------
    <?php echo "Hello World!"; ?>

  6. #6
    Utente di HTML.it L'avatar di neroux
    Registrato dal
    Aug 2009
    Messaggi
    1,973
    Prima riga?

    www.sitemeer.com » Quando un sito pare irraggiungibile

    Se ti piace ci puoi trovare anche su Facebook

  7. #7
    Utente di HTML.it L'avatar di vikey89
    Registrato dal
    Apr 2009
    Messaggi
    333
    Cosa prima riga?? che ha??
    <br />
    http://www.vikeydesign.it
    -----------------------------------
    <?php echo "Hello World!"; ?>

  8. #8
    Utente di HTML.it L'avatar di neroux
    Registrato dal
    Aug 2009
    Messaggi
    1,973
    Codice PHP:
    require('http://allevamentonaxos.altervista.org/config.php'); 

    www.sitemeer.com » Quando un sito pare irraggiungibile

    Se ti piace ci puoi trovare anche su Facebook

  9. #9
    Utente di HTML.it L'avatar di vikey89
    Registrato dal
    Apr 2009
    Messaggi
    333
    ok e come lo devo trasformare?'
    <br />
    http://www.vikeydesign.it
    -----------------------------------
    <?php echo "Hello World!"; ?>

  10. #10
    Utente di HTML.it L'avatar di neroux
    Registrato dal
    Aug 2009
    Messaggi
    1,973
    Come ho scritto nella prima risposta

    Codice PHP:
    require('config.php'); 

    www.sitemeer.com » Quando un sito pare irraggiungibile

    Se ti piace ci puoi trovare anche su Facebook

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.