Render PDF
If filename is the absolute path to pdf file:
If filename is the absolute path to pdf file:
Recently I had the job to convert EPS files to SVG graphics. It has been done for a product configurator that had to be implemented. The whole implementation mentioned here was done for a Magento Online Shop. But the base-paradigms described here can be used in other PHP based applications too because I’ve implemented them […]
Today a colleague of mine ask me if it is possible to call a class constant inside of another class by generating the constant name on the fly. The reason was, that he had multiple constants in one class that had patterned / generic names like that: <?php class IAM_A_CLASS{ const IAM_A_CONSTANT_1 = 1; const […]
Recently I had to build a custom Composer package that had to be installed to a custom install path inside of the target application. But the install path should have been only different for this single package. All other Composer packages had to be installed unter the vendor folder furthermore. Requirements I had the following requirements […]
The different PHP versions unter Plesk ODIN are situated in /opt/plesk/php/. So the PHP paths are for example:  /opt/plesk/php/5.2/bin/php /opt/plesk/php/5.3/bin/php /opt/plesk/php/5.4/bin/php /opt/plesk/php/5.5/bin/php /opt/plesk/php/5.6/bin/php /opt/plesk/php/7.0/bin/php Which PHP versions are available depends on the versions installed. You can see your installed versions under https://yourdomain.com:8443/admin/php-handler/list/ in the Plesk backend.
To see what is going on in Memcache: More information: https://code.google.com/p/phpmemcacheadmin/
This article show to use PHP’s interactive mode to execute PHP code directly on the commandline shell without the need of a script file. This can be useful to test PHP snippets, run short commands or even test a certain PHP configuration.
<?php /** * * String helper class * */ abstract class Sheldon_Misc_String_Helper { /** * @param $sStr – String to clean * * @return string clean string * */ static function cleanWhitespaces( $sStr ) { if ( ! empty( $sStr ) ) { return preg_replace(‘/\s+/’, ”, $sStr ); } return $sStr; } /** * reverse […]