Article View: be.comp.programming
Article #4448[PHP] : probleem bij uploaden van bestanden
From: EM
Date: Fri, 22 Aug 2003 10:21
Date: Fri, 22 Aug 2003 10:21
60 lines
2627 bytes
2627 bytes
Heb wat hulp nodig bij uploaden van bestanden met PHP.
Hieronder vind je beide pagina's die ik hiervoor gebruik :
Ik weet niet of het copygedeelte in de tweede pagina goed
is, maar daar komt het zelfs nooit aan toe : het tonen van
$userfile en parameters gebeurt niet, ze zijn leeg.
Ik vermoed dat het eerder aan instellingen van apache,
php (...) ligt dan aan coding.
Linux SuSe 8.2 met apache - php - mysql. standalone pc
Dank bij voorbaat,
Pugi!
Reply liefst in groep of anders naar
pugilator bij yahoo punt com
-----
<html>
<body>
<!-- ch11-3a.html -->
<form action="ch11-3b.php" method="post"
enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="1024">
Submit this file: <input type="file" name="userfile"><br>
<input type="submit" value="Upload">
</form>
</body>
</html>
-----
<html>
<body>
<!-- ch11-3b.php -->
<p>You have submitted this file:<br><br>
Name: <?php echo($_REQUEST["userfile"]); ?><br>
Original Name: <?php echo($_REQUEST["userfile_name"]); ?><br>
Size: <?php echo($_REQUEST["userfile_size"]); ?><br>
Type: <?php echo($_REQUEST["userfile_type"]); ?><br>
</p>
<?php
if (copy($_REQUEST["userfile"], "/local/phpprofprogram/tst"))
{
echo ("<b>File successfully copied!</b>");
}
else
{
echo ("<b>Error: failed to copy file ...</b>");
}
?>
</body>
</html>
-----
Technical Details
Message-ID:
<bi4r8n$i5i$1@reader08.wxs.nl>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!news2.euro.net!newsfeed.wxs.nl!textnews.wxs.nl!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit X-Google-Thread: 107324,370ff6bdb25ea893,start X-Google-Attributes: gid107324,public X-Google-Thread: fcea4,370ff6bdb25ea893,start X-Google-Attributes: gidfcea4,public X-Google-Thread: 106397,370ff6bdb25ea893,start X-Google-Attributes: gid106397,public X-Google-ArrivalTime: 2003-08-22 03:24:50 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!news2.euro.net!newsfeed.wxs.nl!textnews.wxs.nl!not-for-mail From: "EM" <geralboot@yahoo.co.uk> Newsgroups: be.comp.programming,nl.comp.os.linux.programmeren,nl.comp.programmeren Subject: [PHP] : probleem bij uploaden van bestanden Date: Fri, 22 Aug 2003 12:21:05 +0200 Organization: Planet Internet Lines: 63 Message-ID: <bi4r8n$i5i$1@reader08.wxs.nl> NNTP-Posting-Host: u195-95-92-43.goplanet.pi.be X-Trace: reader08.wxs.nl 1061548119 18610 195.95.92.43 (22 Aug 2003 10:28:39 GMT) X-Complaints-To: abuse@planet.nl NNTP-Posting-Date: 22 Aug 2003 10:28:39 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400