Welcome Guest, Not a member yet? Register   Sign In
What is my current working dir?
#1

(This post was last modified: 05-03-2020, 12:44 PM by jreklund.)

My code is running in a container. I check to see if a certain file exists and it fails. But when I run 

$ docker exec 6adf ls -ls /app/assets/image_crud/views/list.php

I get:

8 -rwxrwxrwx 1 1001 134 5744 Feb 23 06:48 /app/assets/image_crud/views/list.php

Which means that the file was found. 

My code is trying to run if (file_exists($view_file.$file))
and $view_file= "/assets/image_crud/views/"
and $file="list.php"
But this fails so I tried
$view_file.$file= "/app/assets/image_crud/views/list.php"
and that fails too. 


So I am thinking the path is screwed. How can I tell what the CI code thinks the path is? Or is this a docker issue? How can I debug this?
proof that an old dog can learn new tricks
Reply


Messages In This Thread
What is my current working dir? - by richb201 - 05-03-2020, 11:08 AM
RE: What is my current working dir? - by jreklund - 05-03-2020, 12:48 PM
RE: What is my current working dir? - by richb201 - 05-04-2020, 07:38 AM
RE: What is my current working dir? - by jreklund - 05-04-2020, 10:56 AM
RE: What is my current working dir? - by maxxd - 05-04-2020, 02:55 PM
RE: What is my current working dir? - by richb201 - 05-06-2020, 06:45 AM
RE: What is my current working dir? - by atsanna - 05-06-2020, 09:31 AM
RE: What is my current working dir? - by richb201 - 05-06-2020, 10:17 AM
RE: What is my current working dir? - by maxxd - 05-07-2020, 04:15 AM
RE: What is my current working dir? - by richb201 - 05-07-2020, 08:48 AM
RE: What is my current working dir? - by richb201 - 05-23-2020, 11:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB