Jump to content

mkdir - Fairly simple question hopefully....


NoDoze

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/64749-mkdir-fairly-simple-question-hopefully/
Share on other sites

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!

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.