I am trying to create a dir outside of the root Dir on a web server, So i can move the full size images(jpg) into the dir after they are uploaded. i know the solution is staring me in the face but I'm drawing a blank .Is this possible in php
Any help would be appreciated
Create a dir outside of root dir
Moderator: General Moderators
Re: Create a dir outside of root dir
just manually create the directory you want , ex c:\imgstorage and give the read write permission to your webserver user(sometimes nobody in unix) then you can use php to keep creating subfolders or just place the images there.
Re: Create a dir outside of root dir
if my home directory is /mydomain.com i want to create a dir called "/images/events "outside of /mydomain.com. I have tried a number of ways the last one is as follows
The dir /images is already created manually
mkdir('/images/events',0777,true);
chmod('/images/events', 0777);
Still doesn't work
Any advice
The dir /images is already created manually
mkdir('/images/events',0777,true);
chmod('/images/events', 0777);
Still doesn't work
Any advice
Re: Create a dir outside of root dir
are you in one of those shared hosting that limit php or do you have full control?
Re: Create a dir outside of root dir
Got it sorted thanks for the advice
Re: Create a dir outside of root dir
what was it?
Re: Create a dir outside of root dir
the root of my domain was not /images it was found using $_SERVER['DOCUMENT_ROOT]