JavaScript tags in HTML document throws a parsing error
PHP Fatal error: Uncaught Spipu\Html2Pdf\Exception\HtmlParsingException: The HTML tag provided is invalid in /vendor/spipu/html2pdf/src/Parsing/TagParser.php:44 Fixes: For HTML2PDF < 5.x (html2pdf.class.php)
PHP TDD (Test Driven Development)
Nowadays almost all back-end developers are familiar with TDD. It has much more upsides and very little downsides once the actual classes and the test are in place. If you are just experimenting with your code and do not need it for a longer term, you may not need TDD in that case. TDD is actually essential if you want to maintain your code base for a long time. So what does the Test Driven Development consist of? Well, there is the unit test that…
How to Convert your javascript file to a Windows .exe or .dll
Nowadays an average web developer will need to know a broad matrix of skills in order to do his/her development job. HTML, CSS, JavaScript, AJAX, XML, some server side language, some linux/unix/redhat command skills, some apache, some database skills, standards, accessibility, SEO, etc…, the list goes on. Parts of the list are also multiplied by (or raised to the power of at least 10) number of browsers you want to support.
Turning on/off warnings and errors in PHP
Write a script to determine whether the page is on a local, testing, or live server, and set $state to “local”, “testing”, or “live”. Then: Or if you are sure your script is working perfectly, you can get rid of Warning and notices by putting this line at the beginning of your php script: error_reporting(E_ERROR); Before that, during the development, I would properly debug my script so that all notice or warning disappear one by one. So we should first set it as verbose as…
file_get_contents in php7
If file_get_contents($url) generates error “Warning: file_get_contents(…) failed to open stream: Invalid argument in”, use this curl function below.