Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Problem will php upload please help?

Featured Replies

Hello;

I have coded a upload page using php. Everything works fine and there is no problem in code. But when i upload the

 

file and submit it i get successful upload and no error. After this when i go to that particular folder to see the

 

uploaded file, i'm not able to see the file.

 

I tried changing the folder location but still i can see the uploaded file. No problem with folder permission but

 

still i cant find the uploaded file please help me.

 

Result after uploading file:

 

Array

(

[name] => bg.jpg

[type] => image/jpeg

[tmp_name] => C:\xampp\tmp\phpE1.tmp

[error] => 0

=> 3634

)

Lol. Best quote ever :)

 

If your coding a file upload and you don;t see the actual uploaded file, I;d say there's a pretty major issue somewhere.

 

...but there is no problem with the code ;)

 

jokes

 

Result after uploading file:

 

Array

(

[name] => bg.jpg

[type] => image/jpeg

[tmp_name] => C:\xampp\tmp\phpE1.tmp

[error] => 0

=> 3634

)

 

:unsure:

 

Seriously though, how do you expect people to help debug your code if you don't show it?

<?php
echo $_SESSION['user'];
$file=$_FILES["file"]["name"];
//$_FILES["file"]["name"]-De naam van de geuploaded bestand
//$_FILES["file"]["type"]-De type van het geuploaded bestand
//$_FILES["file"]["size"]-De grote van de geuploade bestanden in bytes
//$_FILES["file"]["tmp_name"]-De naam van de tijdelijke geplaatse kopie op de server
//$_FILES["file"]["error"]-De fout code resultaat van de geuploaded bestand
{
move_uploaded_file($_FILES["file"]["tmp_name"],
"C:\wamp\www\k/".$_FILES["file"]["name"]);
}
?>

 

Here this is what you need. It´s a small learning script from mine self.

once the file has been uploaded, it needs to be saved as well.

After the upload, the file is only temporarily saved, hence the name of tmp_name.

 

Keep an lookout for the global $_FILES["file"][""] syntax's of how it works.

  • Author

<?php
echo $_SESSION['user'];
$file=$_FILES["file"]["name"];
//$_FILES["file"]["name"]-De naam van de geuploaded bestand
//$_FILES["file"]["type"]-De type van het geuploaded bestand
//$_FILES["file"]["size"]-De grote van de geuploade bestanden in bytes
//$_FILES["file"]["tmp_name"]-De naam van de tijdelijke geplaatse kopie op de server
//$_FILES["file"]["error"]-De fout code resultaat van de geuploaded bestand
{
move_uploaded_file($_FILES["file"]["tmp_name"],
"C:\wamp\www\k/".$_FILES["file"]["name"]);
}
?>

 

Here this is what you need. It´s a small learning script from mine self.

once the file has been uploaded, it needs to be saved as well.

After the upload, the file is only temporarily saved, hence the name of tmp_name.

 

Keep an lookout for the global $_FILES["file"][""] syntax's of how it works.

 

 

Thank you so much i sorted out the problem.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.