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.
if (mkdir('\\s/home$/PPan',0777))
{
echo ("made directory");
}
else
{
echo ("cannot make directory");
}
However, if I run the script from my PC (which is not the SERVER M), it doesn't work. But if I login as me on SERVER M and run the script there, it works fine.
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:
$folderPath = '\\sal/home$/PPan';
$oldumask = umask(0) ;
mkdir( $folderPath, 0777 ) ;
umask( $oldumask ) ;
Could anyone nice people help me please?:queasy: