Validating file_exists(“test.txt”); is_file(“test.txt”); is_dir(“/temp”); Checking States is_readable(“test.txt”); is_writable(“test.txt”); is_executable(“test.txt”);
Posts Tagged ‘function’
Why you want your own WordPress theme
To have a very sharp Blog, you need your own WordPress theme. There are five reasons official WordPress said you need your own WordPress theme. * To create your own unique WordPress site look * To take advantage of templates, template tags, and the WordPress Loop to generate different web page results and looks. * [...]
JavaScript Classes Comparison
There are more and more JavaScript Classes in front of programers. To choose one of the suitable is very important. Let me list some of them here: jQuery, Ext, MooTools, Prototype, YUI. Remy Sharp has gone through the jQuery and Prototype frameworks, which are probably the two closest to each other, and has done a [...]
strpos()
Using the strpos() function The strpos() function is used to search for a string or character within a string. If a match is found in the string, this function will return the position of the first match. If no match is found, it will return FALSE. Let’s see if we can find the string “world” [...]
strlen()
Using the strlen() function The strlen() function is used to find the length of a string. Let’s find the length of our string “Hello world!”: <?php echo strlen("Hello world!"); ?> The output of the code above will be: 12 The length of a string is often used in loops or other functions, when it is [...]
Date function in JavaScript
Return today’s date and time How to use the Date() method to get today’s date. The following code line defines a Date object called myDate: var myDate=new Date() Note: The Date object will automatically hold the current date and time as its initial value! In the example below we set a Date object to a [...]
Make a Function
A function is a named group of JavaScript statements that you can declare once, near the top of your script, and call over and over again. Declaring a function function name ([parameter] [, parameter] [..., paramenter]){ statements return value } Call a function alert(“Total purchases come to ” + calculateTotal (10, 19.85)) Returning a value [...]


