[PHP] uploaden: $HTTP_POST_FILES is leeg?!

Pagina: 1
Acties:

  • drm
  • Registratie: Februari 2001
  • Laatst online: 09-06-2025

drm

f0pc0dert

Topicstarter
Na eindelijk een volledig cms in elkaar gedraaid te hebben op win98, krijg ik het online niet aan de praat met UNIX.

Bij het uploaden van een bestand gaat het fout. Nu heb ik 2 simpele bestandjes om te testen of het uberhaupt wel werkt, en dat doet het dus niet!

de 2 bestandjes:

test.html:
code:
1
2
3
4
5
6
7
8
<html>
<body>
<form enctype="multipart/form-data" action="test.php" method="post">
   <input name="userfile" type="file"><br>
   <input type="submit">
</form>
</body>
</html>

test.php:
PHP:
1
2
3
4
5
6
7
8
9
10
11
<?
?>
<html>
<body>
   <pre>
<?=var_dump ( $HTTP_POST_FILES )?>
   </pre>
</body>
</html>
<?
?>

output van test.php na submit:
code:
1
string(0) ""

oftewel, $HTTP_POST_FILES bestaat niet, want een isset call geeft false terug. Ook $HTTP_POST_VARS is leeg :? :?

PHP versie is 4.0B2. Ondersteunt deze geen fileuploads :?
Dat zou nl. wel ongeveer de kroon spannen qua schrale bende vandaag!! |:(

Music is the pleasure the human mind experiences from counting without being aware that it is counting
~ Gottfried Leibniz


  • Dennis
  • Registratie: Februari 2001
  • Laatst online: 22:14
Wat doet dat = teken achter het vraagteken :?

  • drm
  • Registratie: Februari 2001
  • Laatst online: 09-06-2025

drm

f0pc0dert

Topicstarter
Op vrijdag 28 september 2001 18:50 schreef dennisdotcom het volgende:
Wat doet dat = teken achter het vraagteken :?
<?="bla"?> is het zelfde als <?echo "bla"?>

maar daar gaat het niet om

Music is the pleasure the human mind experiences from counting without being aware that it is counting
~ Gottfried Leibniz


  • ACM
  • Registratie: Januari 2000
  • Niet online

ACM

Software Architect

Werkt hier

(jarig!)
Op vrijdag 28 september 2001 18:51 schreef drm het volgende:maar daar gaat het niet om
toch wel ;)
want 'vardump' is geen variabele

  • drm
  • Registratie: Februari 2001
  • Laatst online: 09-06-2025

drm

f0pc0dert

Topicstarter
toch niet.
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?
?>
<pre>
<?
function sjaak ()
{
   return "Melperdemelp";
}
?>

<?=sjaak()?>
</pre>
<?
?>

werkt ook, en uiteindelijk is de bottomline dat $HTTP_POST_VARS leeg is, want isset geeft ook false terug, en empty geeft true terug, dus laten we maar weer ontopic gaan ;)

Music is the pleasure the human mind experiences from counting without being aware that it is counting
~ Gottfried Leibniz


  • ACM
  • Registratie: Januari 2000
  • Niet online

ACM

Software Architect

Werkt hier

(jarig!)
Ik lees net de php-manual (gedeelte over file uploads) door en zie oa dat $HTTP_POST_FILES pas in php4.0.2 zit.

Hoe en wat verder weet ik ook niet, maar de userfile zou wel in de HTTP_POST_VARS moeten zitten geloof ik.
Pagina: 1