Simple PHP echo help

585

How could I add an echo in here

move_uploaded_file($_FILES["torrent"]["tmp_name"], "uploads/  (HERE)   .torrent");

I have tried a few things with no luck.

997

Answer

Solution:

It's just a mere guess, but perhaps you want to do something like that:

$newFileName = 'someFielenameGeneratedByYourScript';
move_uploaded_file($_FILES["torrent"]["tmp_name"], "uploads/" . $newFileName . ".torrent");
910

Answer

Solution:

You could do something like:

$location = "uploads/" . $name . ".torrent";

move_uploaded_file($_FILES["torrent"]["tmp_name"], $location);

echo $location;
655

Answer

Solution:

You don't need to echo, since you are passing it to a function not trying to display it in the output.

move_uploaded_file($_FILES["torrent"]["tmp_name"], "uploads/  ".$variable."   .torrent");

People are also looking for solutions to the problem: Data is not inserted in mysql / php

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.