Skip to content
pontikis.net
  • Blog
  • WordPress
  • Labs
  • About
  • Toggle website search
Search this website
Menu Close

tips

  1. Home>
  2. Blog>
  3. tips>
  4. tips
Read more about the article Determine PHP script Invocation: CLI or by the Web Server
Credits

Determine PHP script Invocation: CLI or by the Web Server

  • Post author:Christos Pontikis
  • Post published:September 13, 2013
  • Post category:Web Development
  • Reading time:2 mins read

In most cases you can distinguish if a PHP script was invoked from the command line (or Cron) or by the web server, using php_sapi_name(). php_sapi_name() will return cli on…

Continue ReadingDetermine PHP script Invocation: CLI or by the Web Server
Read more about the article Replace accented characters with non accented with PHP
Credits

Replace accented characters with non accented with PHP

  • Post author:Christos Pontikis
  • Post published:September 9, 2013
  • Post category:Web Development
  • Reading time:4 mins read

Sometimes you need to replace accented characters with non accented, for example when you want to perform an accent insensitive search. A solution could be the following function: <?php /**…

Continue ReadingReplace accented characters with non accented with PHP
Read more about the article Check if a string represents a valid Date or Time with PHP
Credits

Check if a string represents a valid Date or Time with PHP

  • Post author:Christos Pontikis
  • Post published:September 8, 2013
  • Post category:Web Development
  • Reading time:4 mins read

PHP DateTime class, available with PHP versions greater than 5.2 is very powerful. As an example, it ts very easy to check if a string represents a valid date or…

Continue ReadingCheck if a string represents a valid Date or Time with PHP
Read more about the article Reference to a DOM element using jQuery
Credits

Reference to a DOM element using jQuery

  • Post author:Christos Pontikis
  • Post published:September 7, 2013
  • Post category:Web Development
  • Reading time:1 mins read

How can you create a reference to a DOM element using jquery? In other words, what is the jquery equivalent of document.frm.element_name or document.getElementById("element_id") Someone could say: $("#element_id") Wrong, as…

Continue ReadingReference to a DOM element using jQuery
Read more about the article Display Line Numbers in nano
Credits

Display Line Numbers in nano

  • Post author:Christos Pontikis
  • Post published:September 6, 2013
  • Post category:Linux Administration
  • Reading time:1 mins read

nano is a popular text editor for Linux/UNIX. In order to display line numbers, edit global configuration file (or user file /home/user/.nanorc) nano /etc/nanorc Go to line 49 (approximately) and…

Continue ReadingDisplay Line Numbers in nano
  • Go to the previous page
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • Go to the next page

Categories

Archives

NewsLetter

Click here to subscribe to our free email newsletter.
Unsubscribe anytime with a click.

LIKE OUR PAGE!


Say Hello to Gutenberg with my new Free WordPress Plugin Boilerplate for Developers!

Star it on Github!


  • Opens in a new tab
  • Opens in a new tab
  • Opens in a new tab
  • Opens in a new tab
  • Opens in a new tab
  • Opens in a new tab
  • Opens in a new tab
  • Contact
  • Privacy
  • Terms
© Christos Pontikis 2013 - 2025
Close Menu