drive

PHP upload/read files on separate drive

﹥>﹥吖頭↗ 提交于 2019-12-02 11:40:18
I need to be able to upload/view files on a separate drive. Right now, my site is in the htdocs folder on the C: drive. We have been allocated space on the D: drive to upload and view files. Using the code below, I can use scandir to view what is located in htdocs folder: <?php $dir = '../../htdocs/'; $files1 = scandir($dir); $files2 = scandir($dir, 1); print_r($files1); print_r($files2); ?> But I need to traverse back a few more to be able to get to the D: drive. I am not sure if this is even possible. Using the above code, when I attempt to traverse to the D: drive, the path would look

java.lang.IllegalStateException: Must not set scopes in GoogleApiClient.Builder when using Auth.GOOGLE_SIGN_IN_API

て烟熏妆下的殇ゞ 提交于 2019-12-02 10:11:30
问题 I am using drive api with authentication api. I need to login to google account first then upload files to drive. Problem is when i use only drive api without authentication is says unable to sign in. I signed in first using GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestEmail() .build(); mGoogleApiClient = new GoogleApiClient.Builder(this) .enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */) .addApi(Auth

Cannot write on a mapped drive using impersonation

那年仲夏 提交于 2019-12-02 09:25:08
问题 Basically I'm running the same problem as this post Accessing mapped drives when impersonating in ASP.NET I'm working on a legacy website and I need to allow the admins to change the site's logo, banners, etc, from an image file on their desktops to a mapped drive on the server. So, their website is using impersonation whenever it needs to save on the drive, and it's working just fine; however I can't manage to make it work on their test environment nor in my test environment. ¿Any ideas? I

java.lang.IllegalStateException: Must not set scopes in GoogleApiClient.Builder when using Auth.GOOGLE_SIGN_IN_API

大憨熊 提交于 2019-12-02 07:18:51
I am using drive api with authentication api. I need to login to google account first then upload files to drive. Problem is when i use only drive api without authentication is says unable to sign in. I signed in first using GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestEmail() .build(); mGoogleApiClient = new GoogleApiClient.Builder(this) .enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */) .addApi(Auth.GOOGLE_SIGN_IN_API, gso) .build(); Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent

Cannot write on a mapped drive using impersonation

泄露秘密 提交于 2019-12-02 04:36:29
Basically I'm running the same problem as this post Accessing mapped drives when impersonating in ASP.NET I'm working on a legacy website and I need to allow the admins to change the site's logo, banners, etc, from an image file on their desktops to a mapped drive on the server. So, their website is using impersonation whenever it needs to save on the drive, and it's working just fine; however I can't manage to make it work on their test environment nor in my test environment. ¿Any ideas? I've double checked user and password (the code doesn't specify domain) and that's not the issue. Here's

PHP is_dir() returns false on Windows network drive

谁都会走 提交于 2019-12-01 16:31:10
I have a network drive mapped to drive letter X:\ going to an external hard drive with the path of "\\X-Drive\Public\Data". I am using Zend Server with Apache. My PHP command is simple $isFolder = is_dir("x:/"); echo($isFolder); //FALSE Things you should know: The code: $isFolder = is_dir("c:/"); echo($isFolder); //TRUE works as expected. I am running the Zend Apache service as an administrator user. I know this is working properly because in Task Manager the httpd.exe process shows the correct user. The drive is indeed mapped. I have tried mapping it with several users, to include the same

when getting drive information using java

北城余情 提交于 2019-12-01 12:04:02
i tried the following program import java.io.*; class dr { public static void main(String args[]) { try{ File[] roots = File.listRoots(); for (int index = 0; index < roots.length; index++) { //Print out each drive/partition System.out.println(roots[index].toString()); } } catch(Exception e) { System.out.println("error " +e); } } } but in my system floppy drive is not connected and i am getting a message like the following " The drive is not ready for use;its door may be open,Please check drive A: and make sure that disk is inserted and that the drive door is closed" then three options are

New-PsDrive Remote copy from DFS share errors: A specified logon session does not exist

核能气质少年 提交于 2019-12-01 11:29:42
So to recap the situation: I am at one computer trying to run powershell using enter-pssession computername , then from the remote session, run the logic below: $DFSPath = "\\DFSpath.com" $RDL1 = [char](1+[char](gdr ?)[-1].name) New-PSDrive -Name $RDL1 -PSProvider FileSystem -Root $DFSPath -Persist -credential domain\UN The get-variable shows the variables properly. But when I try to create with New-PSDrive , it gives: New-PSDrive : A specified logon session does not exist. It may already have been terminated I did look at this: PowerShell 2.0: Accessing Windows Shares during a Remote Session

how to map network drive for Clearcase View in Windows service?

a 夏天 提交于 2019-12-01 10:38:15
I want to map a clearcase view on network drive inside a windows service. I have tried with net use command, but it did not work properly. You should be able to run the same kind of command than the one used when paths are too long , which is subst : subst X: c:\path\to\my\View # for snapshot view subst X: M:\myView # for dynamic view in order to map a view to a drive letter. This should work from within a service, provided: you are using your Windows account (and not the "Local System account") the dynamic view is already started (and visible in the M:\ MVFS mounting point drive) Garen I wish

Is there a way to create a zip file from multiple files on google drive with the API?

流过昼夜 提交于 2019-12-01 09:34:20
The Google Drive web interface allows you to download a single .zip file if you download a directory. However, I find no way to do that with the API. Is it possible to create a multi file zip on drive with the API? Update: Tanakie's code works! This is great! However, I'm only able to get it working in my personal account. I have two G-Suite admin accounts and I get the error: "Sorry, unable to open the file at this time. Please check the address and try again." I have confirmed this works fine in multiple free personal google accounts. Any idea why it will not work when using a paid google