Article View: es.comp.os.linux.programacion
Article #8469Dudas PHP
From: quantium
Date: Mon, 04 Nov 2002 23:25
Date: Mon, 04 Nov 2002 23:25
29 lines
1691 bytes
1691 bytes
Hola a todos.
�sabeis alguna manera para poder escribir en una cierto byte usando php?
teoricamente deberia funcionar con el siguiente codigo, pero siempre me
copia hola al final de fichero:
<?php
$fichero = "pruebas.txt";
if ($fp = fopen($fichero,"a")) {
echo "Intando abrir $fichero ... correcto <br>";
fseek($fp,1514);
fwrite($fp,"hola");
}
else {
echo "Imposible abrir $fichero";
}
?>
Otra duda que queria consultar, �sabeis como podria copiar el contenido
de un fichero (situado en cierto byte) a otro? es decir, imaginemos que
tenemos un fichero que se llama "hola.php" y queremos copiar todo el
contenido que tenga este fichero desde el byte 20 hasta el final del
mismo al archivo "resultado.php"
Muchas gracias a todos y un saludo.
Technical Details
Message-ID:
<aq6vl0$6ugt5$1@ID-129971.news.dfncis.de>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-han1.dfn.de!news-fra1.dfn.de!fu-berlin.de!uni-berlin.de!62.174.165.72!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,3f79cd7c4869bfcf,start X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2002-11-04 15:25:21 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-han1.dfn.de!news-fra1.dfn.de!fu-berlin.de!uni-berlin.de!62.174.165.72!not-for-mail From: quantium <quantium@lycos.es> Newsgroups: es.comp.os.linux.programacion Subject: Dudas PHP Date: Tue, 05 Nov 2002 00:25:13 +0100 Lines: 30 Message-ID: <aq6vl0$6ugt5$1@ID-129971.news.dfncis.de> NNTP-Posting-Host: 62.174.165.72 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: fu-berlin.de 1036452320 7291813 62.174.165.72 (16 [129971]) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021016 X-Accept-Language: en-us, en