PHP无法在WAMP上找到LESS文件,但可以在服务器上找到

I'm trying to use lessphp on WAMP for local development. I'm trying to preprocess a particular less file on WAMP that is right next to the PHP file, but PHP throws errors saying it cannot find my "input.less" file. When I upload the same set of files to my server, PHP can find the less file and preprocess it just fine.

Is there a setting in my WAMP's php.ini that I need to change for it to be able to find files?

My php file:

<?php
    require "lessc.inc.php";
    $less = new lessc;
    $input = "input.less";
    $less_code = file_get_contents("input.less");
    echo $less->compile($less_code);
?>

My less file:

div {
    border:5pt red dashed;
}

The offending error:

( ! ) Warning: file_get_contents(input.less) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory in F:\Freelance\server\wamp\www\theming\wp-content\themes\spiralkit\header.php on line 51
查看全部
dsfs21312
dsfs21312
2013/05/10 18:28
  • php
  • wamp
  • less
  • wampserver
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

1个回复