Bash is like the very complicated language, even a space can make a syntax error. But, when you get into it often, you will get a hang of it and it will be easy. This post is a solution to one of the most common problems that happen to a newbie in Bash and it’s about a single whitespace. Here is a sample Bash file : a = 50 echo $a and when you execute it, the error will be as follows :[READ MORE]
Posts marked with "error" in tags
Check If A String Is JSON in PHP
Create Your Own URL Shortening Service Using PHP & jQuery
I made a URL shortening service a year back using PHP & jQuery. It was pretty simple. You should know the concept of URL Shortening. The concept is simple. When a user sends a request to short a URL, PHP will check if the URL is valid. If it’s valid then PHP will make a string of 5 or 6 characters. A folder is created with the name of this string and an index.php file with header function code is created in this folder.[READ MORE]
How to display errors in a PHP file ?
When you code PHP some errors might have happened. But you won’t know that and the program don’t work. You can use PHP‘s error_reporting function to display errors. Here’s how to do it: Create a file named errors.php in the folder where the file with errors exist. Open the errors.php file in text editor and paste these codes in the file: error_reporting(E_ALL);ini_set("display_errors", 1);include("filename.php");? Replace filename.php with the name of the file that has errors.[READ MORE]