I cant Upload SWF Files With PHP
I have 2 input file in 1 form. When I'm trying to post with a imageprint_r
orvar_dump
showing its properties.
But when I try to post with an swfprint_r
orvar_dump
saying empty and can't post.
So how can I upload swf files ? Thanks.
echo var_dump($_FILES);
if($_FILES["oyun_yolu_file"]["type"] == "application/x-shockwave-flash")
{
echo "aha";
echo var_dump($_FILES["oyun_yolu_file"]);
}
I have uploaded code already but my problem is I can't upload swf files, I can upload regular files like txt, image etc.
<form action="" method="post" enctype="multipart/form-data">
<table>
<tr>
<td>Resim Yolu</td>
<td>
<input type="text" name="resim_yolu" />
<span id="kirmizi" >yada</span>
<input type="file" name="resim_yolu_file" />
</td>
</tr>
<tr>
<td>Oyun Yolu</td>
<td>
<input type="text" name="oyun_yolu" />
<span id="kirmizi" >yada</span>
<input type="file" name="oyun_yolu_file" />
</td>
</tr>
</table>
</form>
Answer
Solution:
i tested this code by myself and it is working
the output was check your file
ahaarray(5) { ["name"]=> string(23) "Car-speakers-590x90.swf" ["type"]=> string(29) "application/x-shockwave-flash" ["tmp_name"]=> string(23) "E:\xamp\tmp\php7D0E.tmp" ["error"]=> int(0) ["size"]=> int(116887) }