basselin / php-minify Goto Github PK
View Code? Open in Web Editor NEWPhpMinify is a little tool to minify your application php like the javascript minify tools.
License: MIT License
PhpMinify is a little tool to minify your application php like the javascript minify tools.
License: MIT License
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??
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;
}
...
......
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.