Hi !
> a feltoltes: szerintem nem megvalosithato (de lehet, hogy nincs
> igazam) JavaScriptben meg nem lattam olyan fuggvenyt, ami
> file-okat kezelt volna :-) szoval ide valami olyan scriptreszlet kellene,
> amit a kliens oldal (bongeszo) ertelmezni tud.
A Netscape a 3.0 ota tamogatja a HTTP upload-ot. Nem csinaltam ilyet, de
asszem ez valami spec Form mezo. Itt a usernek kell megadni a
feltoltendo filet.
Igy mukodik a freemail, es a tobbi webalapu levelezo rendszer attacs
lehetosege.
Udv:
--
Csiszar L.
http://www.stadium.hu/szt/
|
Sziasztok!
> De lehetseges web-alapu feltoltest csinalni!
Mino igaz... :)
> Remelem segitettem, ha megtudsz valamit, ird meg legyszi ide is,
> szerintem tobbeket is erdekelne, hogy mukodik pontosan.
Ok, akkor megirom en.
Ime egy lehetoseg a sok kozul: (php3+html form)
> ----------------------------------------------------------
File upload support
PHP is capable of receiving file uploads from any RFC-1867
compliant browser. This feature lets people upload both
text and binary files. With PHP's authentication and logical
functions, you have full control over who is allowed to
upload and what is to be done with the file once it has been
uploaded.
A file upload screen can be built by creating a special form
which looks something like this:
Example 2-3. File Upload Form
<FORM ENCTYPE="multipart/form-data" ACTION="_URL_" METHOD=POST>
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000">
Send this file: <INPUT NAME="userfile" TYPE="file">
<INPUT TYPE="submit" VALUE="Send File">
</FORM>
The _URL_ should point to a php html file. The MAX_FILE_SIZE
hidden field must precede the file input field and its value
is the maximum filesize accepted. The value is in bytes. In
this destination file, the following variables will be defined
upon a successful upload:
* $userfile - The temporary filename in which the uploaded
file was stored on the server machine.
* $userfile_name - The original name of the file on the
sender's system.
* $userfile_size - The size of the uploaded file in bytes.
* $userfile_type - The mime type of the file if the browser
provided this information. An example
would be "image/gif".
Note that the "$userfile" part of the above variables is
whatever the name of the INPUT field of TYPE=file is in the
upload form. In the above upload form example, we chose to
call it "userfile".
Files will by default be stored in the server's default
temporary directory. This can be changed by setting the
environment variable TMPDIR in the environment in which
PHP runs. Setting it using a PutEnv() call from within a
PHP script will not work though.
> -----------------------------------------------------------
Konkretabban, van ket fileod. Egyik upload.html, masik upload.php3.
upload.html:
<html>
<body>
<form enctype="multipart/form-data" action="upload.php3" method=post>
<input type="hidden" name="MAX_FILE_SIZE" value="10000">
Send this file: <input name="userfile" type="file">
<input type="submit" value="Send File">
</form>
</body>
</html>
upload.php3:
<?
echo "userfile: ", $userfile, "<br>\n";
echo "userfile_name: ", $userfile_name, "<br>\n";
echo "userfile_size: ", $userfile_size, "<br>\n";
echo "userfile_type: ", $userfile_type, "<br>\n";
?>
Ez most csak annyit csinal, hogy kiirja a feltolteni kivant
file adatait a feltoltes utan :).
Remelem segitettem :).
Ha esetleg valamilyen mas nyelv ala kellene (pl. C, Perl, stb.)
irjal, es osszedobok egyet.
Gergo
|
Hello!
Egy olyan egyszeru programocskat szeretnek irni, ami egy altalam megadott
szovegfile tartalmat egy ablakban kiirna a kepernyore. (Win32-es
kornyezetben). Az ablakra csak a szoveg kell, meg valami lehetoseg a
bezarasara.
Addig mar eljutottam, hogy a szukseges allomanyt megnyitom (ez a 10
forintos kerdes...), viszont nem tudom, hogy milyen modon tudok en egy
ablakot kitenni a kepernyore. Ami meg neheziti a helyzetem, hogy mindezt a
Cygnus-fele CygWin32 felhasznalasaval tennem.
Osszefoglalva: Tudok-e es hogyan grafikus kepernyot kezelni a CygWin32-vel?
A valaszt elore is koszi!
Udv: Zsolt
--
= Szabo Zsolt - =
|