Twig errors with custom template on Chamilo upgrade
- a white page
- an error message about Twig
- if you have xdebug installed and showing error messages, something like this:
Remove permanent redirect (HTTP 301) cache in Firefox
As a web developer configuring SSL certificates on websites you deliver, as we do, you might be faced, one day, with a small issue about configuring a 301 redirect from HTTP to HTTPS that has to be reverted. It so happens that browsers *really* take it to heart to cache an HTTP 301 (permanent redirect) message seriously and deeply. So much so that it might become very difficult to remove this redirect and ever be able to access the site in HTTP again.
dirname(__FILE__) vs __DIR__, which is faster?
- Read more about dirname(__FILE__) vs __DIR__, which is faster?
- Log in to post comments
If you're developing PHP software today but studied PHP based on old-ish manuals or manuals written by people who did, you might find a mix of calls to dirname(__FILE__) and __DIR__ and wonder what the difference is...
Versions of PHP in Ubuntu
- Read more about Versions of PHP in Ubuntu
- Log in to post comments
Awesome git tree on the command line
- Read more about Awesome git tree on the command line
- Log in to post comments
git log --graph --pretty=format':%C(yellow)%h%Cblue%d%Creset %s %C(white) %an, %ar%Creset'It will show something like this (in the terminal)
Benchmark: dirname(__FILE__) vs __DIR__ in PHP
<?php $loops = 100000000; echo 'Testing dirname(__FILE__)' . PHP_EOL; $start = time(); $dir = ''; for ($i = 0; $i < $loops; $i++) { $dir = dirname(__FILE__); } echo 'dirname(__FILE__) took ' . (time()-$start) . 's' .
Can't use function return value in write context
if (!empty(trim($string))) { ... }...only to get a bad error appear (only on your PHP 5.4 server) in the middle of your app, like this?:
Fatal error: Can't use function return value in write contextWell, this has a simple explanation... Prior to PHP 5.5, the empty() function did not accept something else than a variable.
Crowdin terms review for Chamilo LMS translations
Pagination
- Page 1
- Next page