Scenario: I have 2 servers here....SERVER M (hosting the script) and SERVER S (where I want to create new folder).
I want to create a folder on a SERVER S by running the following script that's hosted on SERVER M. Folder home$ already exists in SERVER S, hence it only needs to create a PPan folder.
Code: Select all
if (mkdir('\\\\s/home$/PPan',0777))
{
echo ("made directory");
}
else
{
echo ("cannot make directory");
}
If I make a copy of the script and host it locally on my localhost, running the same script, it works - it creates PPan folder on server S. I know it's a security issue but I don't know what it is.
I've also tried below but same result:
Code: Select all
$folderPath = '\\\\sal/home$/PPan';
$oldumask = umask(0) ;
mkdir( $folderPath, 0777 ) ;
umask( $oldumask ) ;Mod | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: