Welcome Guest, Not a member yet? Register   Sign In
How to manage example.com website from admin.example.com
#6

Could it be that first, you see if the path '../../htdocs/assets/img/posts ...'; exists
and if it does not  you create a directory ../../petvres/assets/img/posts'  
But then you move forward with the first one as your upload directory.

Which seem like some part of that must be a mistake, but there is much code you don't show meaning I don't understand all I know.

I'm confused by what you're attempting to check with the path '../../htdocs/assets/img/posts' . $post_id. That relative path is not required.
As far as the server is concerned the main script executing is index.php. So, unless your code has called chdir('/some/dir/);  the current working directory is 'htdocs'. So I think what you really want is
PHP Code:
if( !is_dir('./assets/img/posts' $post_id) ){ 


I don't see where you use $dir_exist but consider setting it like this
PHP Code:
$dir_exist mkdir('/what/ever/it/is/really/supposed/to/" . "$be:, 0777, true); 


and I don't think any of this would cause a 505 server response.
Reply


Messages In This Thread
RE: How to manage example.com website from admin.example.com - by dave friend - 11-16-2018, 03:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB