These both functions are used to check the existence of the file. But there is a minor difference between these functions. Let’s see what’s the difference. 1) file_exists() This function takes the path as a parameter and return or . This function will return TRUE in case of file exists and FALSE in case if […]
All Posts by : "Avinash"
Here is the simple trick to read the text file line by line. For this I am going to use the and function. This is code snippet I am going to take one text file and read it line by line. Let’s for the code: $file = “/path/to/the/file”; $fp = fopen($file, “r”); while ( $line […]
PHP is very well used scripting language in now a days. But PHP does not have any inbuilt debugging tools or extension. But we have some extensions and tools available which serves the debugging purpose of the PHP. 1) X-Debug X-Debug is the most used and very useful PHP extension. X-Debug will show the variables […]
.htaccess file has a great command over websites. You can perform lots of things without changing the web server’s configuration file.
First of let me say that Magic Quotes is deprected from the PHP 5.3 and will be removed completely from the PHP 6. But as a developer you might face a situation when you have to work on application which runs on older version of PHP with some older functionality like rely on Magic Quotes.
This post is about to explain the use of .htaccess for protecting any file on your server. Earlier I have explained the use of htaccess file to protect the .htaccess file. Here is the code which shows the trick to protect the file using .htaccess file. Protect File using .htaccess # protect file order allow,deny […]
PHP provides variable which gives some information about the environment in which PHP is running. On windows to get these Environment varibale populated you must set the PHP path in the environment variable.
With MySQL we can easily export our selected rows to the files. MySQL has several syntax which can export the retrieved rows into the file. Yes we can import these rows back to database tables also.
As I already posted earlier, PHP has several methods to send the mail. In this post I am going to cover the send mail using PHP Send mail. Earlier I have posted about the send mail using SMTP with PHPMailer. Before this I have posted about the send mail using SMTP with core PHP.