I am trying to copy()
a file from a remote server with the copy()
command as below:
<?php
error_reporting(E_ALL);
$url = $_GET['url'];
if (copy( $url, '/tmp/copy_from_url.jpeg'))
{
echo 'copied';
}
?>
It seems to work as copied
is displayed however there is no file to be found.
Any ideas on how I can track down the problem here?
I am running MAMP
on Lion
both the latest versions. The file in question is a .jpeg
and allow_url_fopen
is on.
Edit: the folder Applications/MAMP/tmp
is actually a symbolic link to /private/tmp
where the files ARE being copied but are not visible.
Is there a way to change PHP
tmp folder?