Re: Problem's addign a script to my web page.
| From: | Marek Kilimajer | Date: | Mon, 22 Sep 2003 19:34:44 +0000 |
| Subject: | Re: Problem's addign a script to my web page. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-163518@lists.php.net to get a copy of this message | ||
Yes, it will get rid of the permission problems.
Example of creating a directory:
$fp=ftp_connect('localhost');
if(ftp_login($fp, $ftpuser, $ftppass)) {
if(ftp_mkdir($fp, $ftpbasedir .'members/'.$iid)) {
/*if(!ftp_site($fp, 'chmod 0777 '.$ftpbasedir .'members/'.$iid)) die('Could not change permission on user directory (chmod 0777 '.$ftpbasedir .'members/'.$iid.')!'); this would not work for you*/
} else {
die('Could not create directory, user directory not created!');
}
} else {
die('Could not login, user directory not created!');
}
I had to create directory with ftp so I could later open it using opendir(). Because chmod does not work for you you will have to even create files using ftp functions.
Stratis Aftousmis wrote:
--- Marek Kilimajer <kilimajer@webglobe.sk> wrote:Optionaly you can use ftp functions to create files and directories.Will that get rid of the parmission's problem? Can you explain a little? __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com