PDA

View Full Version : @ symbol in php and chown questions



BlackBeltNinja
July 27th, 2006, 10:03 AM
I was looking up some info on the copy function in php, on their website and some of the comments use the copy function as such,

@copy($source, $dest);

what does the @ do?

another thing, is after i copy my files, they are all owned by httpd. how do i change these back to my ftp username. I tried using right after the copy function chown, but to no avail. also, al the files are 644. how would i go about chmoding them to 755?

thanks

bwh2
July 27th, 2006, 10:09 AM
for the @, look at post #10 of this thread (http://kirupa.com/forum/showthread.php?t=228046).

for chown (http://us2.php.net/chown), can you post the code you're using? to change the files from 644 to 755, check out chmod() (http://us3.php.net/chmod)

hl
July 27th, 2006, 02:01 PM
Because Brian didn't mention didn't directly mention it, the @ symbol is to supress errors from the function.

bwh2
July 27th, 2006, 02:04 PM
Because Brian didn't mention didn't directly mention it, the @ symbol is to supress errors from the function.clearly it was faster for me to browse for that thread, fail, search, find the thread, find the post, reread the post, copy the link, and paste it in than to just say what the @ is for.

Jeff Wheeler
July 27th, 2006, 02:14 PM
Are you sure it's a Linux server?

hl
July 27th, 2006, 06:51 PM
clearly it was faster for me to browse for that thread, fail, search, find the thread, find the post, reread the post, copy the link, and paste it in than to just say what the @ is for.
Clearly. :lol:

BlackBeltNinja
July 27th, 2006, 08:41 PM
thanks for the @ info

as for chown....
this is how i'm using it:

chown("foldername", "username");
is that incorrect? how should i go about doing this?