Jump to content

[SOLVED] Unlink problem on a Windows Server


TecTao

Recommended Posts

Help please.  I'm trying to remove images from a directory outside of the directory where the delete script resides using the unlink command.  I've used it a million times but this time the application resides on a Windows OS.  The directory structure is:

 

Image is located _imgs/fab_imgs/$img

 

Delete script: _admin-flg/delete_fab_imgs_submitted.php

 

 

On a Unix server the script I would normally be using for unlinking would be the full pagh to the image:

 

$myFile2 = "/home/worldbox/public_html/_imgs/fab_imgs/$img";

unlink($myFile2);

 

 

Unfortunately, this application is on a Windows OS and trying to get the path and permissions is causing me to pull my hair out.  Running echo $_SERVER['DOCUMENT_ROOT']; returns E:\http\florida-gl.com .  So combing the usual page to the directories and files doesn't make sense.

 

So I tried the following which would make sense:

 

$myFile2 = "../_imgs/fab_imgs/$img";

unlink($myFile2);

 

I get the following error:

 

Warning: unlink(../_imgs/fab_imgs/CopyFabrication01_1.jpg) [function.unlink]: Permission denied in E:\http\florida-glass.com\_admin-flg\fab_delete_submitted.php on line 30

 

I can only set the permissions to rw,rw,rw

 

So I'm i need of a little direction.

 

 

 

 

 

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.