hi
I have a problem in unix!
I have a script on windows server.
this script upload a file from client to a folder on windows server.
this script worked successfully on windows server.
then I ftp this script on unix server successfully. but when I run this script the progrom get me warning.
server can not copy file into my folder on unix???????????
please help me .
the html file source is:
//-----------------//
<html>
.
.
.
<body>
<form method="post" action="copy.php" enctype="multipart/form-data">
file: <input type="file" name="f1">
<input type="submit">
</form>
.
.
.
//----------------//
and the php file source is:
//-----------------//
<?php
if(copy($f1,$f1_name))
echo "ok";
else
echo "no copy";
?>
//----------------//
and the server warning is:
//---------------//
Warning: open_basedir restriction in effect. File is in wrong directory in ........... basic/copy.php on line 1
//--------------//
thank
upload file on unix
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Stick:
into a file and check out how your host has configured PHP and especially safe mode. Then look in the manual to find out what you can or cannot do based on the restrictions that have been set.
Mac
Code: Select all
<php phpinfo(); ?>Mac
i have old problem
hi dearnielsene wrote:Open_basedir restriction is a consequence of Safe-Mode.
safe mode on php.ini is "on"
i modify it and change value of safe mode
now the safe mode on php.ini is "off".
but i have old problem.
i find answer my question
i very happy .
because i find answer my question.i think my problem is big!
i work on this problem 3day and then find answer this.
when we can not copy with copy() function we use move_uploaded_file() function
this function have top secure.
this function is easy.
i suggest to use move_uploaded_file() instead of copy(),always.

because i find answer my question.i think my problem is big!
i work on this problem 3day and then find answer this.
when we can not copy with copy() function we use move_uploaded_file() function
this function have top secure.
this function is easy.
i suggest to use move_uploaded_file() instead of copy(),always.