<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to Upload files with PHP</title>
	<atom:link href="http://www.martin-gardner.co.uk/how-to-upload-files-with-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.martin-gardner.co.uk/how-to-upload-files-with-php/</link>
	<description>Technology - Gadgets - Programing - Gaming - Reviews - Tutorials</description>
	<lastBuildDate>Fri, 09 Dec 2011 20:47:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Marty</title>
		<link>http://www.martin-gardner.co.uk/how-to-upload-files-with-php/comment-page-1/#comment-23387</link>
		<dc:creator>Marty</dc:creator>
		<pubDate>Wed, 22 Sep 2010 07:09:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.martin-gardner.co.uk/?p=32#comment-23387</guid>
		<description>this could be one of two things,

1: change the tmp path in php.ini file to something relative to your http folder..
2: change permissions on your upload folder to allow write access

I see your using localhost, this could be that perhaps your using windows as a test environment?
this will have a different effect on your upload from your Feroda server..

best to upload to a test server and check it out there..!
let me know how you get on :)</description>
		<content:encoded><![CDATA[<p>this could be one of two things,</p>
<p>1: change the tmp path in php.ini file to something relative to your http folder..<br />
2: change permissions on your upload folder to allow write access</p>
<p>I see your using localhost, this could be that perhaps your using windows as a test environment?<br />
this will have a different effect on your upload from your Feroda server..</p>
<p>best to upload to a test server and check it out there..!<br />
let me know how you get on :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saurabh</title>
		<link>http://www.martin-gardner.co.uk/how-to-upload-files-with-php/comment-page-1/#comment-23385</link>
		<dc:creator>Saurabh</dc:creator>
		<pubDate>Wed, 22 Sep 2010 06:33:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.martin-gardner.co.uk/?p=32#comment-23385</guid>
		<description>Dear All,

I am unable to upload the file... i am using fedora13 as an OS.
the code is like :---
----------------------index.php---------------------


&lt;strong&gt;Select File&lt;/strong&gt;



----------------------End-------------------------------


upload.php :
------------------Start-------------------
&lt;?php
$target_path=&quot;&quot;; 
$file_name = &quot;&quot;;
//echo(&quot;Hi&quot;);

$file_name = basename($_FILES[&#039;f1&#039;][&#039;name&#039;]);
//echo($file_name);

if($file_name != &quot;&quot;)
{
$target_path = &quot;uploads/&quot; . mktime() .&quot;_&quot;;
//echo($target_path);
$target_path = $target_path . $file_name;

echo($_FILES[&#039;f1&#039;][&#039;tmp_name&#039;].&quot;&quot;);
echo($target_path.&quot;&quot;);

move_uploaded_file($_FILES[&#039;f1&#039;][&#039;tmp_name&#039;], $target_path);
}
else
{
echo &#039;The file field was empty or no file selected.&#039;;
}
?&gt;
------------End-------------------------------------------------

I got output like :
------------------------
/tmp/phpY5Da38
uploads/1285136586_file.ods
------------------------

but the upload folder still empty.

the locations of the files are:

1. File System/var/www/html/file_upload/index.php
2. File System/var/www/html/file_upload/upload.php
3. File System/var/www/html/file_upload/uploads (target Folder)

Access URL:
http://localhost/file_upload/index.php

if any body able to fix..then please get back to me....thanks in advance.</description>
		<content:encoded><![CDATA[<p>Dear All,</p>
<p>I am unable to upload the file&#8230; i am using fedora13 as an OS.<br />
the code is like :&#8212;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-index.php&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p><strong>Select File</strong></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-End&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>upload.php :<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;Start&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
&lt;?php<br />
$target_path=&quot;&quot;;<br />
$file_name = &quot;&quot;;<br />
//echo(&quot;Hi&quot;);</p>
<p>$file_name = basename($_FILES[&#039;f1&#039;][&#039;name&#039;]);<br />
//echo($file_name);</p>
<p>if($file_name != &quot;&quot;)<br />
{<br />
$target_path = &quot;uploads/&quot; . mktime() .&quot;_&quot;;<br />
//echo($target_path);<br />
$target_path = $target_path . $file_name;</p>
<p>echo($_FILES[&#039;f1&#039;][&#039;tmp_name&#039;].&quot;&#8221;);<br />
echo($target_path.&#8221;");</p>
<p>move_uploaded_file($_FILES['f1']['tmp_name'], $target_path);<br />
}<br />
else<br />
{<br />
echo &#8216;The file field was empty or no file selected.&#8217;;<br />
}<br />
?&gt;<br />
&#8212;&#8212;&#8212;&#8212;End&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>I got output like :<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
/tmp/phpY5Da38<br />
uploads/1285136586_file.ods<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>but the upload folder still empty.</p>
<p>the locations of the files are:</p>
<p>1. File System/var/www/html/file_upload/index.php<br />
2. File System/var/www/html/file_upload/upload.php<br />
3. File System/var/www/html/file_upload/uploads (target Folder)</p>
<p>Access URL:<br />
<a href="http://localhost/file_upload/index.php" rel="nofollow">http://localhost/file_upload/index.php</a></p>
<p>if any body able to fix..then please get back to me&#8230;.thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prem saharan</title>
		<link>http://www.martin-gardner.co.uk/how-to-upload-files-with-php/comment-page-1/#comment-16626</link>
		<dc:creator>prem saharan</dc:creator>
		<pubDate>Fri, 16 Jul 2010 05:52:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.martin-gardner.co.uk/?p=32#comment-16626</guid>
		<description>thanks a lot... i m new to PHP.. struggling for last 2 days to learn uploading file.. ur was the only column that helped me out of more than 100 i visited... reason being the file name &quot;F1&quot;, should be same in form  and $_FILES... u r the only one who has explained it completely... thanxs again..</description>
		<content:encoded><![CDATA[<p>thanks a lot&#8230; i m new to PHP.. struggling for last 2 days to learn uploading file.. ur was the only column that helped me out of more than 100 i visited&#8230; reason being the file name &#8220;F1&#8243;, should be same in form  and $_FILES&#8230; u r the only one who has explained it completely&#8230; thanxs again..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: maoj</title>
		<link>http://www.martin-gardner.co.uk/how-to-upload-files-with-php/comment-page-1/#comment-13056</link>
		<dc:creator>maoj</dc:creator>
		<pubDate>Wed, 05 May 2010 06:54:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.martin-gardner.co.uk/?p=32#comment-13056</guid>
		<description>I am make a PHP submission form, when click submit button this error will come out

&quot;Warning: move_uploaded_file(uploads/dd.pdf) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/newton/domains/newton.co.in/public_html/uploader.php on line 12

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move &#039;/tmp/phpNIPhXb&#039; to &#039;uploads/dd.pdf&#039; in /home/newton/domains/newton.co.in/public_html/uploader.php on line 12
There was an error uploading the file, please try again!&quot;

Please sort out this problem</description>
		<content:encoded><![CDATA[<p>I am make a PHP submission form, when click submit button this error will come out</p>
<p>&#8220;Warning: move_uploaded_file(uploads/dd.pdf) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/newton/domains/newton.co.in/public_html/uploader.php on line 12</p>
<p>Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move &#8216;/tmp/phpNIPhXb&#8217; to &#8216;uploads/dd.pdf&#8217; in /home/newton/domains/newton.co.in/public_html/uploader.php on line 12<br />
There was an error uploading the file, please try again!&#8221;</p>
<p>Please sort out this problem</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: make windows xp run faster</title>
		<link>http://www.martin-gardner.co.uk/how-to-upload-files-with-php/comment-page-1/#comment-3106</link>
		<dc:creator>make windows xp run faster</dc:creator>
		<pubDate>Mon, 20 Jul 2009 18:20:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.martin-gardner.co.uk/?p=32#comment-3106</guid>
		<description>I found your blog on google and read a few of your other posts. I just added you to my Google News Reader. Keep up the good work. Look forward to reading more from you in the future.</description>
		<content:encoded><![CDATA[<p>I found your blog on google and read a few of your other posts. I just added you to my Google News Reader. Keep up the good work. Look forward to reading more from you in the future.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: haifafans</title>
		<link>http://www.martin-gardner.co.uk/how-to-upload-files-with-php/comment-page-1/#comment-863</link>
		<dc:creator>haifafans</dc:creator>
		<pubDate>Sun, 28 Dec 2008 16:42:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.martin-gardner.co.uk/?p=32#comment-863</guid>
		<description>cool i like it :D
i will use it :D</description>
		<content:encoded><![CDATA[<p>cool i like it :D<br />
i will use it :D</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://www.martin-gardner.co.uk/how-to-upload-files-with-php/comment-page-1/#comment-857</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Thu, 25 Dec 2008 03:43:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.martin-gardner.co.uk/?p=32#comment-857</guid>
		<description>Just a note, as far as I cant tell PHP 5 isn&#039;t required to run this code, it ought to work on PHP 4.x too.</description>
		<content:encoded><![CDATA[<p>Just a note, as far as I cant tell PHP 5 isn&#8217;t required to run this code, it ought to work on PHP 4.x too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: marty</title>
		<link>http://www.martin-gardner.co.uk/how-to-upload-files-with-php/comment-page-1/#comment-818</link>
		<dc:creator>marty</dc:creator>
		<pubDate>Mon, 15 Dec 2008 01:11:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.martin-gardner.co.uk/?p=32#comment-818</guid>
		<description>Hi Jad,
this would really depend on your web host, 
what you can do is create a new php page, 
copy this code into you page 

phpinfo();

open it in your browser and look for this &quot;upload_max_filesize&quot; without the Quotes and it will tell you..</description>
		<content:encoded><![CDATA[<p>Hi Jad,<br />
this would really depend on your web host,<br />
what you can do is create a new php page,<br />
copy this code into you page </p>
<p>phpinfo();</p>
<p>open it in your browser and look for this &#8220;upload_max_filesize&#8221; without the Quotes and it will tell you..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jad</title>
		<link>http://www.martin-gardner.co.uk/how-to-upload-files-with-php/comment-page-1/#comment-817</link>
		<dc:creator>Jad</dc:creator>
		<pubDate>Mon, 15 Dec 2008 00:43:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.martin-gardner.co.uk/?p=32#comment-817</guid>
		<description>its nice but the upload size limit is only 5 mb right?</description>
		<content:encoded><![CDATA[<p>its nice but the upload size limit is only 5 mb right?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erica</title>
		<link>http://www.martin-gardner.co.uk/how-to-upload-files-with-php/comment-page-1/#comment-419</link>
		<dc:creator>Erica</dc:creator>
		<pubDate>Tue, 14 Oct 2008 18:50:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.martin-gardner.co.uk/?p=32#comment-419</guid>
		<description>
	Select File: 
	


</description>
		<content:encoded><![CDATA[<p>Select File:</p>
]]></content:encoded>
	</item>
</channel>
</rss>

