safakbalcan adlı üyeden alıntı: mesajı görüntüle
@byvolkan61; öncelikle, özel mesaj gönderip beni konuya davet ettiğiniz için teşekkür ederim.

dosya.txt;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
test.php

<?php

	if (isset($_POST['txtIndex']) && isset($_POST['txtResponse']))
	{
		$_POST['txtResponse'] = '';

		$startIndex = $_POST['txtIndex'];

		$length = 20;

		$lines = array();

		$fileName = 'dosya.txt';

		$readStream = fopen($fileName, 'r');

		$Index = 0;

		while ( ! feof($readStream))
		{
			$line = fgets($readStream);

			if ($Index >= $startIndex && $Index < ($startIndex + $length))
			{
				$lines[] = trim($line);
			}

			$Index++;
		}

		fclose($readStream);

		$_POST['txtIndex'] += $length;

		$_POST['txtResponse'] = count($lines) > 0 ? rtrim(trim(implode(', ', $lines)), ',') : 'Belirtilen aralikta veri yok.';
	}

?><!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
	</head>
	<body>
		<form method="POST">
			<div>
				<input name="txtIndex" type="hidden" value="<?php echo isset($_POST['txtIndex']) ? $_POST['txtIndex'] : '0'; ?>" />
			</div>
			<div>
				<input name="txtResponse" type="text" value="<?php echo isset($_POST['txtResponse']) ? $_POST['txtResponse'] : ''; ?>" />
			</div>
			<div>
				<button type="submit">Send</button>
			</div>
		</form>
	</body>
</html>
İlgili kod ile alâkalı herhangi bir sorun yaşarsanız, konu içerisinde bana sorabilirsiniz.
Çok teşekkür ederim hocam, peki ben her satırı ayrı textboxa nasıl çekebilirim

5 satır gelsin istiyorum. 5 textbox olsun
2 Buton olsun birisi textboxlara veri çeksin diğeri gelen verileri göndersin.