PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<?php
print_r( $_FILES );
print_r( $_POST );
?>
</head>
<body>
<form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST">
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
<!-- Name of input element determines name in $_FILES array -->
Send this file: <input name="userfile" type="file" />
<input type="submit" value="Send File" />
</form>
</body>
</html>
If I post a file then the print_r($_FILES) and print_r($_POST) returns empty ... but if I don't post a file, I get back:
Array
(
[userfile] => Array
(
[name] =>
[type] =>
[tmp_name] =>
[error] => 4
[size] => 0
)
)
Array
(
[MAX_FILE_SIZE] => 30000
)
Is there some configuration setting that I am missing? Please help!
The only problem with installing XAMPP is that it is not secure, it is meant for "development environments". I will be transferring this over to a windows server and it would be useful to test in an identical environment. Any other suggestions?
And that is in what way more secure than xampp (1.5.4: Apache 2.2.3, MySQL 5.0.24a, PHP 5.1.6)?
(only testing wether "The only problem with installing XAMPP is that it is not secure" is just a phrase or there's something more to it )
I was just quoting their website. According to their website:
XAMPP is configured is to be as open as possible and to allow the web developer anything he/she wants. For development environments this is great but in a production environment it could be fatal.
Here a list of missing security in XAMPP:
* The MySQL administrator (root) has no password.
* The MySQL daemon is accessible via network.
* PhpMyAdmin is accessible via network.
* Examples are accessible via network.
* The user of Mercury and FileZilla are known.