function vat_add($price, $vat) { $nett = $price; $gross = $nett * ($vat / 100) + $nett; return $gross; } function vat_remove($price, $vat) { $gross = $price; $nett = $gross-($gross * ($vat / 100)); return $nett; }
Tag Archives: PHP
AngularJS-Twig conflict with double curly braces
solution 1 You can change the start and end interpolation tags using interpolateProvider service. One convenient place for this is at the module initialization time. angular.module(‘myApp’, []).config(function($interpolateProvider){ $interpolateProvider.startSymbol(‘{[{‘).endSymbol(‘}]}’); }); Solution 2 You can use too the attribute-based directive <p ng-bind=”yourText”></p> is the same as <p>{{yourText}}</p> Solution 3 Verbatim, is very elegant and readable for several …
Continue reading “AngularJS-Twig conflict with double curly braces”
Creating a PHP REST Routing Class for Your Application
The main features typically are: REST Routing Use different HTTP methods for same URL’s to determine different types of action / request Support dynamic URL segments Provide the capability for reverse routing; creating the destination URL from an array of route variables SEO friendly URL’s using a .htaccess to route all URL’s into your class
How to encrypt string without mcrypt library in php
Check this
php fast-cgi No input file specified error
No input file specified error Sometimes you may get this error when you switch the web server API module to CGI/FastCGI. I got this error during the site migration time.
Blocking scraping website content
The + Symbol is nothing in specific, its just a query string appending variables.. (that url with + symbol is also accessible through curl anywayz.) If you are using an Apache server you can put the following in a .htaccess file to block out site stealers: