asked on
<?php
// Get MySQL connection
include "./includes/SimpleImage.php";
///////////////////////////////////////////////////////////
// Upload image to server
$fileName = $_FILES['uploaded_image']['name'];
$tmpName = $_FILES['uploaded_image']['tmp_name'];
$fileSize = $_FILES['uploaded_image']['size'];
$fileType = $_FILES['uploaded_image']['type'];
?>
<table width="50%" border="1" align="center">
<tr>
<td width="54%">File Name</td>
<td width="46%"><?php echo $fileName; ?></td>
</tr>
<tr>
<td>Tmp Name</td>
<td><?php echo $tmpName; ?></td>
</tr>
<tr>
<td>File Size</td>
<td><?php echo $fileSize; ?></td>
</tr>
<tr>
<td>File Type</td>
<td><?php echo $fileType; ?></td>
</tr>
</table>
PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.
TRUSTED BY
prob need to review phpinfo() to check them all.
do you have error reporting on so you can see any errors?
Did you recently upgrade your PHP?
Is your upload_tmp_dir setup in the ini? and permissions to that location setup correctly?
- try touch() and then unlink() (read up on them to determine what they do) against a dummy file in your upload_tmp_dir. that should offer a good permission test.
also, who knows maybe something up in your include() file, maybe you should comment it out to verify.
Also, it is completely stupid, but try print_r($_POST) & print_r($_FILES) just to get a clear picture of the raw data posted. (should be the same as populating / echoing out your variablesas you did in the script above but might as well.