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
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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.