Giter VIP home page Giter VIP logo

php-minify's People

Contributors

basselin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

php-minify's Issues

It is showing error on many files.

I downloaded this and trying to test it. Here is my folder structure.

\--|
    |- Build/
    |- Main/
    |- demo.php 
    |- phpminify.php  

I have edited the demo to set source as Main/ and target as Build/.

The source folder has 461 items but the Build folder only contains 218 items.

For all the missing files, The error message is same ( only difference is being filename.)

Warning: file_put_contents(./Build/Library/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php): failed to open stream: No such file or directory in /var/www/Test/phpminify.php on line 187
PHP Warning:  file_put_contents(./Build/Library/Monolog/Handler/SyslogUdp/UdpSocket.php): failed to open stream: No such file or directory in /var/www/Test/phpminify.php on line 187

Warning: file_put_contents(./Build/Library/Monolog/Handler/SyslogUdp/UdpSocket.php): failed to open stream: No such file or directory in /var/www/Test/phpminify.php on line 187
PHP Warning:  file_put_contents(./Build/Library/Psr/Log/LoggerInterface.php): failed to open stream: No such file or directory in /var/www/Test/phpminify.php on line 187

Warning: file_put_contents(./Build/Library/Psr/Log/LoggerInterface.php): failed to open stream: No such file or directory in /var/www/Test/phpminify.php on line 187
PHP Warning:  file_put_contents(./Build/Library/Psr/Log/LogLevel.php): failed to open stream: No such file or directory in /var/www/Test/phpminify.php on line 187

Warning: file_put_contents(./Build/Library/Psr/Log/LogLevel.php): failed to open stream: No such file or directory in /var/www/Test/phpminify.php on line 187
PHP Warning:  file_put_contents(./Build/Library/Psr/Log/Test/LoggerInterfaceTest.php): failed to open stream: No such file or directory in /var/www/Test/phpminify.php on line 187

Warning: file_put_contents(./Build/Library/Psr/Log/Test/LoggerInterfaceTest.php): failed to open stream: No such file or directory in /var/www/Test/phpminify.php on line 187
PHP Warning:  file_put_contents(./Build/Library/Monolog/Processor/WebProcessor.php): failed to open stream: No such file or directory in /var/www/Test/phpminify.php on line 187

What could be wrong??

Failed while creating many sub directories [ Fixed ]

Since you are using recursive command to create sub-folders don't forget to put 0777 to the mkdir, I tried your minify class its very nice, only thing it failed while creating many sub directories, and slash issues , I fixed the error like this

      public function run()
       {
        ...
        ....
        .....
          // Fixed slash issue
          $targetPathname = preg_replace('#/+#','/',$targetPathname);

                 if ($value->isDir()) {
                        if ($value->getBasename() == '.') {
                        $dirname = dirname($targetPathname);

                if (!is_dir($dirname)) {
                    mkdir($dirname, 0777, true);
                }
                $return[$value->getPath()] = $dirname;
            }
            continue;
        }
    ...
   ......
 }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.