zirgs Posted March 31, 2006 Report Share Posted March 31, 2006 taatad man nesen radaas taada probleema ar apaci , jau kadu laiku jau maacos php tad nu domaaju jaataisa augshaaa web lapa nu uztaisiju uzliku uz janhost.com servera tur tas scripts straadaa visss ok (tas ir zem linuxa) a tagad uztaisiiju home serveri (uz windos xp) un itkaa pirmaa .php scripta dalja straadaa bet otru vnk raada kaaa tx failu .. kas vareetu buut par peobleemu? te tas ko raada kaa .txt <html> <head> <title>Voting Results</title> <style type="text/css"> body {background-color: #000000; color: #273b0d; font-family: Verdana, sans-serif; font-size: 11px; text-align: center;} </style> </head> <body> <?php $file='1.txt'; $fh=fopen($file,'r') or die ('Failed to read file'); $result1=fread($fh,filesize($file)); fclose($fh); $file='2.txt'; $fh=fopen($file,'r') or die ('Failed to read file'); $result2=fread($fh,filesize($file)); fclose($fh); $file='3.txt'; $fh=fopen($file,'r') or die ('Failed to read file'); $result3=fread($fh,filesize($file)); fclose($fh); $file='4.txt'; $fh=fopen($file,'r') or die ('Failed to read file'); $result4=fread($fh,filesize($file)); fclose($fh); $file='5.txt'; $fh=fopen($file,'r') or die ('Failed to read file'); $result5=fread($fh,filesize($file)); fclose($fh); $file='6.txt'; $fh=fopen($file,'r') or die ('Failed to read file'); $result6=fread($fh,filesize($file)); fclose($fh); $file='7.txt'; $fh=fopen($file,'r') or die ('Failed to read file'); $result7=fread($fh,filesize($file)); fclose($fh); $file='8.txt'; $fh=fopen($file,'r') or die ('Failed to read file'); $result8=fread($fh,filesize($file)); fclose($fh); $file='9.txt'; $fh=fopen($file,'r') or die ('Failed to read file'); $result9=fread($fh,filesize($file)); fclose($fh); $file='10.txt'; $fh=fopen($file,'r') or die ('Failed to read file'); $result10=fread($fh,filesize($file)); fclose($fh); ?> <br/> Place a mark for this web layout 1-10? <br/> <br/> 1 = <?php echo "$result1"; ?> votes.<br/> 2 = <?php echo "$result2"; ?> votes.<br/> 3 = <?php echo "$result3"; ?> votes.<br/> 4 = <?php echo "$result4"; ?> votes.<br/> 5 = <?php echo "$result5"; ?> votes.<br/> 6 = <?php echo "$result6"; ?> votes.<br/> 7 = <?php echo "$result7"; ?> votes.<br/> 8 = <?php echo "$result8"; ?> votes.<br/> 9 = <?php echo "$result9"; ?> votes.<br/> 10 = <?php echo "$result10"; ?> votes.<br/> Total votes: <?php $total= $result1 + $result2 + $result3+ $result4+ $result5+ $result6+ $result7+ $result8+ $result9+ $result10; echo "$total"; ?> </body> </html> Link to comment Share on other sites More sharing options...
Blitz Posted March 31, 2006 Report Share Posted March 31, 2006 bus vien nepareizi nokonfigurets apacis... paradi to dalu kas stradaa! Link to comment Share on other sites More sharing options...
hmnc Posted March 31, 2006 Report Share Posted March 31, 2006 AddType application/x-httpd-php .php tas jāliek pie httpd.conf iekš apachefolder. un tas pie nosacījuma, ja php modulis ielādēts :) ja nav tad lasi instalāciju Link to comment Share on other sites More sharing options...
zirgs Posted March 31, 2006 Author Report Share Posted March 31, 2006 shii buutu straadaajoshaa dalja <html> <head> <meta http-equiv="Refresh" content="1; URL=results.php"> <title> Place a mark for this web layout 1-10?</title> <style type="text/css"> body {background-color: #000000; color: #273b0d; } a:link, a:visited, a:active { color: #273b0d; text-decoration: underline; } a:hover { color: #273b0d; text-decoration: none; } </style> </head> <body> <script language="javascript" type="text/javascript"> window.resizeTo(600,400); </script> <?php $vote=$_POST["rate"]; $file="$vote" . ".txt"; $fh=fopen($file,'r') or die ('Failed to read file'); $count=fread($fh,filesize($file)) or $count=1; fclose($fh); $count++; $fh=fopen($file,'w') or die('could not open file'); fwrite($fh,$count) or die ('could not write'); fclose($fh); ?> <br/> Thank you for your vote.<br/> Redirecting to results... </body> </html> un par to... man beigaas ir .conf failam sitaada rinda ScriptAlias /php/ "c:/web_p/php/" Action application/x-httpd-php "/php/php-cgi.exe" AddType application/x-httpd-php .php tad kas vareetu buut...? un ko tu teici kaa bija tad jaaielaadee tas modulis...? bet ja jau viena dalja straadaa bet otra ne tad jau php itkaa straadaa(daljeeji) ... :( Link to comment Share on other sites More sharing options...
Grey_Wolf Posted March 31, 2006 Report Share Posted March 31, 2006 'elementarna Vatson' faila paplasinaajums nav PHP un tas arii viss uzliec *.php un viss iess vai noraadi kaadus paplasinaajumus vel(bez *.php) vajag apstraadaat ar PHP... P.S. AddType application/x-httpd-php .php noraada ka njemt kaa PHP prograamu vaijag tikai failus ar doto paplasinaajumu ja pieliksi: AddType application/x-httpd-php .bla tad arii failus *.bla apstraadaas kaa PHP scriptus... Link to comment Share on other sites More sharing options...
zirgs Posted March 31, 2006 Author Report Share Posted March 31, 2006 nu bet vinsh ir ar paplashinaajumu .php ... :( bet piem jociigi tas ka palaizhot vinju taapat to lapu vnk kompii uz taa scripta visss straadaa bet caur apache un rakstot adresi nekas nestraadaaa..? kaa tas var buut?znachit kaut kas apacim nepatiik... Link to comment Share on other sites More sharing options...
Grey_Wolf Posted March 31, 2006 Report Share Posted March 31, 2006 kaa tu to domaaji? uzrakstot brauzeri c:\apache\doc_ruts\mana_lapa.php straadaa un localhost\mana_lapa.php nestraadaa ???? Link to comment Share on other sites More sharing options...
zirgs Posted March 31, 2006 Author Report Share Posted March 31, 2006 ja...kaa tas var buut? Link to comment Share on other sites More sharing options...
Kristabs Posted March 31, 2006 Report Share Posted March 31, 2006 tas var buut taa - NEVAR! :) otraadaak tikai Link to comment Share on other sites More sharing options...
Paulinjsh Posted April 1, 2006 Report Share Posted April 1, 2006 short_tags on Link to comment Share on other sites More sharing options...
bubu Posted April 1, 2006 Report Share Posted April 1, 2006 Paulinjsh: kur viņa kodā ir kāds short open tags? Link to comment Share on other sites More sharing options...
Paulinjsh Posted April 1, 2006 Report Share Posted April 1, 2006 Ok, nav! Neiedziļinājos. Link to comment Share on other sites More sharing options...
Recommended Posts