Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 10-06-2004, 05:31 PM copy command help
capetek's Avatar
Extreme Talker

Posts: 229
Location: Massachusetts
Trades: 0
Hello im trying to figure out how to use the copy command and wondering if someone can help me out. Im looking to create a directory from register and copy files there on creation. Ive got most of it completed but cant seem to get the copy function working.


what should i type after

mkdir("$username", 0777)

to copy a file named random.php to directory $username
__________________
Anthony LeBoeuf
Cape-Tek IT Solutions

Please login or register to view this content. Registration is FREE

Great hosting at affordable pricing!
capetek is offline
Reply With Quote
View Public Profile Visit capetek's homepage!
 
 
Register now for full access!
Old 10-06-2004, 07:02 PM
Christopher's Avatar
Iced Cap

Latest Blog Post:
Cross-domain AJAX with JSONP
Posts: 3,110
Location: Toronto, Ontario
Trades: 0
PHP Code:
copy('randon.php'"$username/random.php"); 
Should work.
__________________

Please login or register to view this content. Registration is FREE
- Latest Articles:
Please login or register to view this content. Registration is FREE
,
Please login or register to view this content. Registration is FREE

--
Please login or register to view this content. Registration is FREE

Christopher is offline
Reply With Quote
View Public Profile
 
Old 10-07-2004, 12:24 AM
capetek's Avatar
Extreme Talker

Posts: 229
Location: Massachusetts
Trades: 0
Code:
mkdir("$username", 0777) 
copy('random.php', "$username/random.php");
yeah i tried that before and i keep getting this error


Parse error: parse error, unexpected T_STRING in /home/user/public_html/add.php on line 58

the copy command is on line 58
__________________
Anthony LeBoeuf
Cape-Tek IT Solutions

Please login or register to view this content. Registration is FREE

Great hosting at affordable pricing!
capetek is offline
Reply With Quote
View Public Profile Visit capetek's homepage!
 
Old 10-07-2004, 01:00 AM
Republikin's Avatar
Defies a Status

Posts: 3,189
Trades: 3
mkdir("$username", 0777)

Should be...

mkdir("$username", 0777);

Whenever you get an error like this, the first thing you should do is check the line above the line specified in the error. Always check for a missing semi-colon
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Republikin is offline
Reply With Quote
View Public Profile
 
Old 10-07-2004, 01:17 AM
capetek's Avatar
Extreme Talker

Posts: 229
Location: Massachusetts
Trades: 0
AHA! That was the problem i was having! How embaressing. Well thanks alot guys for your replys.
__________________
Anthony LeBoeuf
Cape-Tek IT Solutions

Please login or register to view this content. Registration is FREE

Great hosting at affordable pricing!
capetek is offline
Reply With Quote
View Public Profile Visit capetek's homepage!
 
Old 10-07-2004, 01:58 AM
Republikin's Avatar
Defies a Status

Posts: 3,189
Trades: 3
Not embarrasing, common. I have been doing this for a while now and still miss semi-colons.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Republikin is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to copy command help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.36420 seconds with 12 queries