You are here: Re: How to load a CSV/TXT file in a textarea? « HTML « IT news, forums, messages
Re: How to load a CSV/TXT file in a textarea?

Posted by Martin Pφpping on 03/25/06 16:48

Martin PΓΆpping schrieb:
> But now I want the content of my file in the textarea and I am asking
> myself, if this is possible only via HTML and without coding a file
> upload, for example with PHP

If somebody is interested, here is a solution with PHP:

<h1>Upload</h1>

<form
action="<?php echo $PHP_SELF ?>"
method="post"
enctype="multipart/form-data">
<input type="file" name="probe" />
<input type="submit" value="Go!" />
</form>
<hr />
<?php
if (isset($_FILES['probe']) and ! $_FILES['probe']['error']) {

move_uploaded_file($_FILES['probe']['tmp_name'], "./tmp/newfile.txt");

printf("Sie ist %u Bytes groß und vom Typ %s.<br />\n",
$_FILES['probe']['size'], $_FILES['probe']['type']);

?>
<textarea cols="50" rows="50"><?include('./tmp/newfile.txt')?></textarea>
<? }
?>




But my question still exists:

Is it possible to show the content of a txt-file in a textarea only with
using HTML?


Bye,
Martin

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация