Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 14th, 2006, 11:44 AM
Authorized User
Join Date: Dec 2003
Location: , , .
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default rename warning error

When I try to use rename I get an error:

Warning: rename(./x.JPG;,./v.jpg;): No such file or directory in /home/content/html/test/index.php on line 27

Am I using it correctly? Here is a snip from my code:

24 $ext = findexts ($old_name) ;
25 $new_name = str_replace(" ", "-", $new_name);
26 $new_name = $new_name . '.' . $ext;
27 rename ("./".$old_name, "./".$new_name);

Is there some way to specify the current directory? Some syntax error?


Reply With Quote
  #2 (permalink)  
Old January 10th, 2007, 02:32 AM
Friend of Wrox
Join Date: Oct 2003
Location: colombo, WP, Sri Lanka.
Posts: 481
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran

don't use dot(.) there if you using your directory back use two dots(..) or levae without put and dots.

(Anything is Possible)
Reply With Quote
  #3 (permalink)  
Old January 10th, 2007, 06:23 AM
Authorized User
Join Date: Dec 2006
Location: Burla, Orissa, India.
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to paagle

yeah dots get things confusin and make sure that u gave enough privilages or whatever they call it in php.ini file and make sure that the file doesnot exist from before
i mean one with the new name

TEAM LEADER-Team Xuberance(http://www.xuberance.com)
Reply With Quote

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile Error when running LNC Rename Add-in Dhanick Access 1 December 1st, 2008 08:55 AM
log4j warning. and error. sureshrgsl Apache Tomcat 0 April 16th, 2007 03:08 AM
LNC Rename control Add-in error jbage BOOK: Expert One-on-One Access Application Development 7 March 22nd, 2007 08:41 AM
fixing the 'headers already sent' warning/error ire BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 August 21st, 2006 07:35 AM
Warning error, please help! kscritch BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 December 12th, 2005 04:33 PM

All times are GMT -4. The time now is 07:32 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.