felix7 Posted February 1, 2018 Share Posted February 1, 2018 Hello, At first, I tested this method in a little PHP file and it works fine. I want to use less for CSS, so I'm compiling it throuhg PHP code (http://leafo.net/lessphp/). The problem it is in the require: Warning: require_once(/work/modules/displayworks/lessc.inc.php): failed to open stream: No such file or directory in /opt/lampp/htdocs/work/modules/displayworks/displayworks.php on line 63 Well, sincerely, I don't know where I have to place this file (because I want to use in other files). I place it everywhere, but it doesn't work. If I place it at 'config' folder and I did this require: require $_SERVER['DOCUMENT_ROOT'].'/<namefolder>/config/lessc.inc.php; And that works. Obviously, I don't want write that code, What is the path variable? There are not information about this (Prestashop documentation is useless, they said "2+2=4" and then you have to integrate or derive). Okay, that's one problem. After that, I get this: Fatal error: Uncaught Exception: load error: failed to find /work/modules/displayworks/views/css/prueba.less in /opt/lampp/htdocs/work/config/lessc.inc.php:1818 Stack trace: #0 /opt/lampp/htdocs/work/config/lessc.inc.php(1844): lessc->compileFile('/work/modules/d...', '/work/modules/d...') #1 /opt/lampp/htdocs/work/modules/displayworks/displayworks.php(66): lessc->checkedCompile('/work/modules/d...', '/work/modules/d...') #2 /opt/lampp/htdocs/work/classes/Hook.php(591): DisplayWorks->hookDisplayHeader(Array) #3 /opt/lampp/htdocs/work/classes/Hook.php(546): HookCore::coreCallHook(Object(DisplayWorks), 'hookdisplayHead...', Array) #4 /opt/lampp/htdocs/work/classes/controller/FrontController.php(579): HookCore::exec('displayHeader') #5 /opt/lampp/htdocs/work/controllers/front/IndexController.php(37): FrontControllerCore->initContent() #6 /opt/lampp/htdocs/work/classes/controller/Controller.php(189): IndexControllerCore->initContent() #7 /opt/lampp/htdocs/work/classes/Dispatcher.php(367): ControllerCore->run() #8 /opt/lampp/h in /opt/lampp/htdocs/work/config/lessc.inc.php on line 1818 File is there! I don't know why say that... I can copy this path (work/modules/displayworks/views/css/prueba.less) and access to that file. Any idea? Thanks in advance! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now