Warning [2] is_dir() has been disabled for security reasons - Line: 119 - File: inc/init.php PHP 7.1.33 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
[PHP] errorHandler->error_callback
/inc/init.php 119 is_dir
/global.php 20 require_once
/showthread.php 28 require_once
Finding your directory in yab
The following warnings occurred:
Warning [2] is_dir() has been disabled for security reasons - Line: 441 - File: global.php PHP 7.1.33 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
[PHP] errorHandler->error_callback
/global.php 441 is_dir
/showthread.php 28 require_once




Finding your directory in yab
#1
The old way:

Code:
//////////////////////////////////////////////////////////////////
sub getdir$( programname$)
// find out in which directory we are in
////////////////////////////////////////////////////////////////
local path$
local catch
catch=0
if (!peek("isbound")) then
   path$=system$("ps")
   x=instr(path$,"/"+programname$)
   path$=left$(path$,x)
   for x=len(path$)-1 to 1 step -1
      if (instr(path$," ",x) and catch=0) catch=x+1
   next
   path$=right$(path$,len(path$)-catch)
   path$=trim$(path$)
   if path$="/" then
        path$ = trim$(system$("pwd"))+"/"
   else
      path$="/"+path$
   endif

else
path$=trim$(peek$("directory") )
path$=path$+"/"

end if

return path$
end sub


The new way:


Code:
//////////////////////////////////////////////////////////////////
sub path$()
// find out in which directory we are in
////////////////////////////////////////////////////////////////
path$=attribute get$ "",""
path$=path$+"/"
return path$
end sub


This uses attribute get$ with no attribute name and no file name.
Reply


Messages In This Thread
Finding your directory in yab - by bbjimmy - 06-07-2015, 10:24 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)
Free Web Hosting