php | CodeRevolution https://coderevolution.ro Earn more passive income by fueling your WordPress autoblogs with the right plugins! Sat, 16 Oct 2021 17:31:09 +0000 en-US hourly 1 https://coderevolution.ro/wp-content/uploads/2018/07/72.png php | CodeRevolution https://coderevolution.ro 32 32 Dynamically generate static CSS files using PHP https://coderevolution.ro/2021/10/16/dynamically-generate-static-css-files-using-php/ https://coderevolution.ro/2021/10/16/dynamically-generate-static-css-files-using-php/#comments Sat, 16 Oct 2021 17:31:09 +0000 https://coderevolution.ro/?p=6988 If you are a premium theme developer, there may be times when you will need to generate dynamic CSS/JavaScript files to be used inside your theme. An example to this is when you want the users to be able to change certain aspects of the CSS including colors, backgrounds, padding, borders, or add their own […]

The post Dynamically generate static CSS files using PHP first appeared on CodeRevolution - Autoblogging WordPress Plugins.]]>
https://coderevolution.ro/2021/10/16/dynamically-generate-static-css-files-using-php/feed/ 9
PHP tip: How to convert a relative URL to an absolute URL https://coderevolution.ro/2021/07/17/php-tip-how-to-convert-a-relative-url-to-an-absolute-url/ https://coderevolution.ro/2021/07/17/php-tip-how-to-convert-a-relative-url-to-an-absolute-url/#respond Sat, 17 Jul 2021 06:43:12 +0000 https://coderevolution.ro/?p=6947 It was a long time since I create a coding related blog post. So, this is a good opportunity to continue this tradition and talk today about absolute and related URLs and how to handle them in PHP. An absolute URL is complete and ready to use to download a web file. But web pages often […]

The post PHP tip: How to convert a relative URL to an absolute URL first appeared on CodeRevolution - Autoblogging WordPress Plugins.]]>
https://coderevolution.ro/2021/07/17/php-tip-how-to-convert-a-relative-url-to-an-absolute-url/feed/ 0
Facts of the PHP Programming Language https://coderevolution.ro/2018/11/16/facts-of-the-php-programming-language/ https://coderevolution.ro/2018/11/16/facts-of-the-php-programming-language/#respond Fri, 16 Nov 2018 08:50:53 +0000 http://coderevolution.ro/?p=1674 PHP ( PHP: Hypertext Preprocessor ) was released in the 1995. PHP was originally known as Personal Home Page written as a set of Common Gateway Interface (CGI) in C Language by Danish/Greenlandic programmer Rasmus Lerdorf. Lerdorf initially created these Personal Home Page Tools to replace a small set of Perl scripts he had been using to maintain his personal homepage and was originally designed to replace a set […]

The post Facts of the PHP Programming Language first appeared on CodeRevolution - Autoblogging WordPress Plugins.]]>
https://coderevolution.ro/2018/11/16/facts-of-the-php-programming-language/feed/ 0
Tip: Create temporary files in PHP https://coderevolution.ro/2018/10/16/tip-create-temporary-files-in-php/ https://coderevolution.ro/2018/10/16/tip-create-temporary-files-in-php/#respond Tue, 16 Oct 2018 09:46:45 +0000 http://coderevolution.ro/?p=1523 PHP provides two very useful functions to create temporary files. Instead of creating unnecessary tmp directories in your applications, it’s better to rely on the global directory assigned for that matter. To create a unique file with the right permissions use the tempnam function: $filename = tempnam('/tmp_directory', 'filePrefix'); You can test this from the command line like this: php […]

The post Tip: Create temporary files in PHP first appeared on CodeRevolution - Autoblogging WordPress Plugins.]]>
https://coderevolution.ro/2018/10/16/tip-create-temporary-files-in-php/feed/ 0
Writing a PHP command line script that takes options https://coderevolution.ro/2018/10/13/writing-a-php-command-line-script-that-takes-options/ https://coderevolution.ro/2018/10/13/writing-a-php-command-line-script-that-takes-options/#respond Sat, 13 Oct 2018 10:29:57 +0000 http://coderevolution.ro/?p=1520 First of all, we make our file start like this. #!/usr/bin/env php This allows us to run the script without prefixing it with the “php” command, and instead we can run it like this: chmod +x myscript  # This gives execution permissions to the script, do it only once ./myscript --first=option --second --third=option If we […]

The post Writing a PHP command line script that takes options first appeared on CodeRevolution - Autoblogging WordPress Plugins.]]>
https://coderevolution.ro/2018/10/13/writing-a-php-command-line-script-that-takes-options/feed/ 0
10 PHP functions you (probably) never use https://coderevolution.ro/2018/07/08/10-php-functions-you-probably-never-use/ https://coderevolution.ro/2018/07/08/10-php-functions-you-probably-never-use/#respond Sun, 08 Jul 2018 19:44:38 +0000 http://coderevolution.ro/?p=1056 When scripting in PHP, we often restrict ourselves to a limited number of API functions: the common ones, like print(), header(), define(), isset(), htmlspecialchars(), etc. If some needed functionality doesn’t exist, we often write it making use of these basic components which we have in mind. The PHP API actually offers a lot of functionality, some useless […]

The post 10 PHP functions you (probably) never use first appeared on CodeRevolution - Autoblogging WordPress Plugins.]]>
https://coderevolution.ro/2018/07/08/10-php-functions-you-probably-never-use/feed/ 0