PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old June 16th, 2004, 02:06 AM
Cédric Cédric is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 1 Cédric User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Post PHP Upload Script / What changes i have to do?

Hello Everybody

I have to change the following Upload Script, that when I upload a File, instead of
renaming in filename_01, overwriting the existing file. I'm a PHP-Newbie and don't know what
I have to do. I think it's the line with "$newname = basename" in this episode of the script. Thx for help! :-)

PHP Code:
/*
     *
     * TASK = UPLOAD
     *
     */
    
if(!empty($uploadfile)) {
     
$newname basename ($this->filehandler->func_upload(array("data"=>0,target=>"$dir/")));
     
$sizefilesize("$dir/$newname");
     
$comment t3lib_div::GPvar('comment');
     if(
$newname) {
        
$this->insert_file_entry("FILE",$reldir,$newname,$size,$comment);
     }
     else {
        
$content .= "<p class='error'>".$this->pi_getLL("error")."</p>";
     }
    } 

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > PHP Upload Script / What changes i have to do?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway