marnix Posted October 31, 2005 Report Share Posted October 31, 2005 Man izpildot skriptu izmet kļūdu Notice: Undefined variable: region in c:\web\easyphp1-8\www\generate.php on line 5 no sekojoša skripta <? $name = $_POST['Naktsmitnes_veids']; $text = $_POST['Nosaukums']; $file=fopen($text.".html", 'w+'); fputs($file,"<h3><strong>$name '$text' $region </strong></h3><br> <img src='icons/$name.gif' alt='$name'>"); fclose($file); ?> <? $links = ("$name,links"); $file=fopen($links.".html",'a'); fputs($file,"<a href='$text.html'>$name '$text'</a><br>"); fclose($file); ?> Ja varat pasakiet kas par vainu... :D Link to comment Share on other sites More sharing options...
bubu Posted October 31, 2005 Report Share Posted October 31, 2005 Mainīgais $region nav definēts. Link to comment Share on other sites More sharing options...
php_Stopp Posted October 31, 2005 Report Share Posted October 31, 2005 pirms piektās rindiņas tev jāpiešķir mainīgajam $region vērtība, to dara šādi: $region="veertiiba"; :D vai arī $region=$_POST['region']; vai arī tev ir jāizdzēš no piektās rindiņas simbolu virkne '$region'. Link to comment Share on other sites More sharing options...
marnix Posted November 1, 2005 Author Report Share Posted November 1, 2005 veelviens errors Warning: Division by zero in c:\web\easyphp1-8\www\generate.php on line 5 Warning: Division by zero in c:\web\easyphp1-8\www\generate.php on line 11 <? $region = $_POST['Region']; $name = $_POST['Naktsmitnes_veids']; $text = $_POST['Nosaukums']; $file=fopen($region/$text.".html", 'w+'); fputs($file,"<h3><strong>$name '$text' $region </strong></h3><br> <img src='icons/$name.gif' alt='$name'>"); fclose($file); ?> <? $links = ("$name,links"); $file=fopen($region/$links.".html",'a'); fputs($file,"<a href='$region/$text.html'>$name '$text' $region</a><br>"); fclose($file); ?> Link to comment Share on other sites More sharing options...
orion Posted November 1, 2005 Report Share Posted November 1, 2005 (edited) Lūdzu nequotēt bezjēgā (bubu) Pieņemts zināšanai (orion) Dalīt ar nulli nedrīkst! kas tas tāds? $file=fopen($region/$text.".html", 'w+'); jābūt nu vismaz šādi: $file=fopen($region.'/'.$text.".html", 'w+'); Vispār saproti, ko tur esi darījis? mēģini ar tekstu veikt matemātiskas darbības... :DD Edited November 1, 2005 by orion Link to comment Share on other sites More sharing options...
marnix Posted November 1, 2005 Author Report Share Posted November 1, 2005 paldies..... tu man ļoti palīdzēji :D Link to comment Share on other sites More sharing options...
Recommended Posts