It is currently Thu Mar 28, 2024 8:32 am


All times are UTC


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: fail to change directory use php code
PostPosted: Wed Mar 08, 2006 9:22 pm 
Noobie
Noobie

Joined: Wed Mar 08, 2006 8:53 pm
Posts: 5
I want to use php code to upload my files. I change directory in php code to directory : /www/ddver.freeownhost.com/ but I receive message no such file or directory.
I have already created subdomain ddver.freeownhost.com.

Here is the message :
220 ProFTPD 1.2.9 Server (freesuperhost.com) [freesuperhost.com]
331 Password required for ddver.
230 User ddver logged in.
227 Entering Passive Mode (70,84,229,131,159,240).
200 Type set to I
257 "/" is current directory.
550 /www/ddver.freeownhost.com/: No such file or directory
257 "/" is current directory.
221 Goodbye.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 08, 2006 9:33 pm 
The correct path is /home/www/ddver.freeownhost.com/ or try /ddver.freeownhost.com/


Top
  
 
 Post subject:
PostPosted: Wed Mar 08, 2006 10:14 pm 
Noobie
Noobie

Joined: Wed Mar 08, 2006 8:53 pm
Posts: 5
Thank you. it works with path /ddver.freeownhost.com/.
but I have a little problem when upload file to directory ddver.freeownhost.com. I already changed permission to 777 but still got error message.

code I use is like this :
fputs($con,"SITE CHMOD 777 /ddver.freeownhost.com/\r\n");

I also tried change permission from control panel manually. But still got the same error message

Here is the message :

220 ProFTPD 1.2.9 Server (freesuperhost.com) [freesuperhost.com]
331 Password required for ddver.
230 User ddver logged in.
227 Entering Passive Mode (70,84,229,131,200,114).
200 Type set to I
257 "/" is current directory.
200 SITE CHMOD command successful
250 CWD command successful.
257 "/ddver.freeownhost.com" is current directory.

Warning: fopen(/ddver.freeownhost.com/): failed to open stream: Permission denied in /home/www/ddver.freeownhost.com/tesupload.php on line 71

Thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 09, 2006 4:35 pm 
Moderator
Moderator

Joined: Thu Dec 15, 2005 2:59 pm
Posts: 681
Location: England
You tried from the file manager ?..If not, try it now :)

_________________
Mountain biking forum ;)
Ponds and fishkeeping :D


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 09, 2006 8:03 pm 
Noobie
Noobie

Joined: Wed Mar 08, 2006 8:53 pm
Posts: 5
Yes, I used file manager to upload my files.
the problem is, I make a small code and I want to write the result in a text file ( I want to put this text file in directory /ddver.freeownhost.com/) before display it. Is it possible?

Thanks for response


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 10, 2006 8:26 pm 
Moderator
Moderator

Joined: Thu Dec 15, 2005 2:59 pm
Posts: 681
Location: England
Yeah, just make it create/fill a text file with the text. Not a hard script at all.

If you need more help, post back and i'll post some script for you to work off.

_________________
Mountain biking forum ;)
Ponds and fishkeeping :D


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 10, 2006 10:37 pm 
Noobie
Noobie

Joined: Wed Mar 08, 2006 8:53 pm
Posts: 5
I used savefile function to write data into a file. But it seems I dont have permission to write file in my directory. I tried this code in another server and it works with CHMOD 777.

here is the function :
function savefile($data,$site,$kbytes)
{
for($i=0;$i<$kbytes;$i++)
{
$fd=fopen($site,"w");
fputs($fd,$data);
}
fclose($fd);
}

---

if you can give me some scripts to solve this problem. its very helpful.


thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 13, 2006 2:30 pm 
Noobie
Noobie

Joined: Wed Mar 08, 2006 8:53 pm
Posts: 5
Thanks Dale, now it works. I can save my file in my directory


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 13, 2006 4:53 pm 
Moderator
Moderator

Joined: Thu Dec 15, 2005 2:59 pm
Posts: 681
Location: England
Yey :D

_________________
Mountain biking forum ;)
Ponds and fishkeeping :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ]  Moderators: fhmagic, KJ, Moderators, Support Team

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
100WebSpace © 2011