NoDoze Posted August 13, 2007 Share Posted August 13, 2007 I am using a 2 page php form to create a folder name. The first page of the php form askes for the needed info by field: user, name, value. The second page of the php form compiles this info into a folder name so that: user, name, value will be the name of the folder. Then when submited, this form will create the needed folder on the server. I am using this: <?php mkdir("/path/to/my/dir", 0777); ?> However, the webserver with the php form is different than where the folder needs to be created. How would I adjust the path to create the folder on a different server? Is this possible? Thanks! Quote Link to comment Share on other sites More sharing options...
Asperon Posted August 13, 2007 Share Posted August 13, 2007 you would need the absolute path that goes through to the other server, if its on a local machine then you can go to that folder, and go to properties and get the path there Quote Link to comment Share on other sites More sharing options...
NoDoze Posted August 13, 2007 Author Share Posted August 13, 2007 These are linux servers....in a local network, an intranet site, so security isn't an issue. But I'm guessing if I made the path like this: \\192.168.1.152\foldername\folder\ It would work? Would it need FTP access? Or something like that? I've never seen or heard of an php script being able to create a folder on a different server. Please clarify... Thanks! Quote Link to comment Share on other sites More sharing options...
Asperon Posted August 13, 2007 Share Posted August 13, 2007 I"m not quite familiar with Linux nor do I fully know php's capability with servers. But it would seem to me that in a local network, you would have access to directories on other parts of the network, so ip or a path such as "\\Server\my documents" in the case of windows. though php may only be limited to the local server on that particular machine. Quote Link to comment Share on other sites More sharing options...
Asperon Posted August 13, 2007 Share Posted August 13, 2007 also try looking here http://us3.php.net/manual/en/function.mkdir.php to see if it has any info thatmight help Quote Link to comment Share on other sites More sharing options...
NoDoze Posted August 13, 2007 Author Share Posted August 13, 2007 Ya, I got that much from that same link Thanks for the help... But does anyone else know the answer...? Thanks. Quote Link to comment Share on other sites More sharing options...
d22552000 Posted August 13, 2007 Share Posted August 13, 2007 how about I help you? use ftp_mkdir. search it up on php.net. Quote Link to comment Share on other sites More sharing options...
NoDoze Posted August 13, 2007 Author Share Posted August 13, 2007 Hmmm...was trying to avoid using FTP...to try to limit the overhead...and make intergration with the existing php simple... Anyone got any other ideas? Thanks... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.