TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 11-28-2010, 03:14 PM   #1 (permalink)
The Wanderer
 
Join Date: Oct 2010
Posts: 9
Thanks: 2
medvirus is on a distinguished road
Default rename problem

hi friend in php why cant rename file across drive
like this
suppose :
PHP Code:
$c="";
$d="";
$re=rename($c,$d);
if(
$re)
{echo 
"Success";}
else{
echo 
"Failed";} 
Now if i put
$c="F:\/1.jpg";
ANd
$d="F:\/2.jpg";
it show me success

But if i Change Drive then Not work
like
$c="F:\/1.jpg";
ANd
$d="E:\/2.jpg";
then Failedd

So Hope some will Solve my problem or give me a good Solution...
medvirus is offline  
Reply With Quote
Old 11-28-2010, 06:51 PM   #2 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Does it give a more specific reason for failure? If I had to guess I'd say its a permissions error, make sure the user that runs PHP had access to both hard drives.
__________________

Village Idiot is offline  
Reply With Quote
Old 12-01-2010, 09:17 AM   #3 (permalink)
The Wanderer
 
Join Date: Oct 2010
Posts: 9
Thanks: 2
medvirus is on a distinguished road
Default

this error i got
Warning: rename(C:\/1.amr,D:\/1.amr) [function.rename]: No error in C:\wamp\www\prev0~.php on line 4
Failed
PHP Warning: rename(C:\/1.amr,D:\/1.amr) [function.rename]: No error in C:\wamp\www\prev0~.php on line 4
medvirus is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ajax + Javascript + DIV problem maeltar Javascript, AJAX, E4X 0 07-04-2010 07:57 AM
problem getting data on the html table.... jetnet1 General 2 11-24-2008 06:55 PM
Huge Session Problem Killswitch General 1 11-17-2008 02:36 AM
Problem with Query + While $a = mysql_fetch_array($b) Aaron Absolute Beginners 0 07-03-2008 07:16 PM
A bug or a cache problem?! yazid Advanced PHP Programming 0 05-22-2008 08:40 AM


All times are GMT. The time now is 03:28 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design