quale server? bisogna vedere in quale spazio hanno il sito. da quello che capisco cmq quello che hai scaricato è uno script php per news che usa come database un file di testo.
quale server? bisogna vedere in quale spazio hanno il sito. da quello che capisco cmq quello che hai scaricato è uno script php per news che usa come database un file di testo.
Un tardo hegeliano di Busalla / allevava un gorilla nella stalla
citando Adorno nell notti chiare / finché il primate stanco di ascoltare
lo strangolò con una sciarpa gialla Dillo Con Parole Sue
Il server avevamo pensato che fosse Linux dedicato su uno dei maggiori provider...., ma nel pannello di controllo non ho trovato uno di news
qualsiasi aiuto è sollievo.
config.php
<?php
$password = "ronin16"; /* Set your password here. The default is test. It is recommended you make your own password */
$font = "arial"; /* set your font type here. The default is arial. */
$fontsize = "2"; /* set your font size here. The default is 2. */
$websitename = "Lidap Piemonte"; /* Set the name of your website here */
$websiteurl = "http://www.lidp.net"; /* Set the URL to your website here */
?>
news.php
<html>
<head>
<title>News Lidp Piemonte</title>
</head>
<body bgcolor="#6B859C">
<table height="400" width="600" cellpadding="0" cellspacing="0" border="0" bgcolor="#A0C6E8" align="center">
<tr>
<td width="20">
</td>
<td>
<font face="arial" size="2">
<center><b>News Editor Lidp Piemonte</b></center><br>
<form action="thankyou.php" method="POST">
Posted By: <input type="text" name="name"><br>
Email: <input type="text" name="email"><br>
Title: <input type="text" name="title"><br>
Password: <input type="text" name="password"><br><br>
News:<br> <TEXTAREA ROWS=10 COLS=60 name="news"></textarea><br>
<input type="submit">
</td>
</tr>
</table>
</font>
</body>
</html>
thankyou.php
<?php
include ("config.php");
$filename = 'news.txt';
$date = date("F j, Y, g:i a");
$name = $_POST["name"];
$email = $_POST["email"];
$title = $_POST["title"];
$news = $_POST["news"];
$pass = $_POST["password"];
if ($password == $pass)
{
$file = file_get_contents($filename);
$fp = fopen($filename, "w");
fwrite($fp, "<font face=$font size=$fontsize><B>$title</b> Posted by: <a href=mailto:$email>$name</a><Br><b>Date:</b> $date<br> $news</font><br><br>");
fwrite($fp, $file);
fclose($fp);
?>
<html>
<head>
<title>Crystal News Editor</title>
</head>
<body bgcolor="#6B859C">
<?php echo "<font face=$font size=$fontsize>";
echo "<center><h2>Congratulazioni!!</h2></center>";
echo "<center>La tua news è stata inserita correttamente<Br>";
echo "Go To: <a href=$websiteurl>$websitename</a> | <a href=news.php>Fai un'altra News</a></center></font>";
?>
</body>
</html>
<?php }
else {
echo "Password errata!<a href=news.php>Riprova</a>.";
}
?>
Ultima modifica di ronin16; 15-10-2014 a 10:30
e hai provato a scrivere le news? cosa succede? non mettere la password nel codice però, cioè qui nel forum intendo
Un tardo hegeliano di Busalla / allevava un gorilla nella stalla
citando Adorno nell notti chiare / finché il primate stanco di ascoltare
lo strangolò con una sciarpa gialla Dillo Con Parole Sue
Non ho ancora provato perchè non si è ancora deciso cosa prendere. Quando devi mettere tante teste insieme è difficile. La password la cambio chiaro, ma ad esmpio i permessi sulla cartella principale mi lasciano perplesso. non posso mi camettere tutto a 777, ti pare?
Grazie per l'intervento.