Jump to content

tonyio

New Members
  • Posts

    4
  • Joined

  • Last visited

tonyio's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. smbclient connection works perfectly, i use it to get files with known names, but at this case i can't know the name, i need to find name of most recent file that exist in the directory.
  2. i never worked with samba, and i going mad, coz this is second day for this simple task...and i cannot solve it
  3. I need to reach Win server, scan shared folder and find out what is last created file name on this folder, and than copy this file to local folder. BUT main problem is smb, never used it before, and this is what i came up with, but no luck. require_once('smbclient.php'); $latest = null; $smbc = new smbclient ('//10.1.1.10/Share/Address Verification/', 'domain\\username', 'password'); if ($handle = opendir($smbc)) { $latest = null; while (($cur = readdir($handle) !== false)) { if ($latest == null || filectime($cur) > filectime($latest)) { $latest = $cur; } } closedir($handle); } return $latest; please help, returns Warning: opendir() expects parameter 1 to be string
×
×
  • 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.