Welcome back to shortlearner.com, in this post we will see how to delete a file inside the directorywith the help of PHP.
so its quite easy to delete the files inside the directory with the help of a single predefined PHP function. PHP provide us a predefined function unlink. with the help of this function we can easily delete the files from our directoryso in the below example we should try to learn how the unlink function works.
$query="insert into ank_jyotishkosh(word,image,structure,meaning,extra,search,lang,status) values('".$word."','".$image."','".$structure."','".$meaning."','".$extra."','".$search."','".$lang."','".$status."')";
$output='<label class="text-danger">Invalid File</label>';//if non excel file then
Note : When you run this code and got some error then please make sure you have enabled zip extension on your server.This is the common error which we receive.
Welcome back to shortlearner.com, in this post we will see how to enable PHP ZIP extension on cPanel. before start this tutorial, we should take a overview about PHP extension. so basically PHP extension enables you to transparently read or write ZIP compressed archives and the files inside them.
and most of the time it is disable by default in cPanel , so we have to manually install it. So just follow the steps and install these extensions manually. Note: try to follow snaps for better understanding.
step 1: So in the very first step , we should login into our cPanel(Control Panel) and than go to the software section Step 2: in the software section click on PHP Pear Packages
Step3: after clicking on PHP Pear Packages we are searching our ZIP extension and install it.
step 4 : After installing the package we should again go to our software section and click on the PHP version .
Step5: once we click on the select PHP Version, we can see all the enable extension over there, and we can see our Archiv_ZIP as well. so we just checked it and hit on the save button to add archive_zip in our current PHP version.
Step5: now the last and very important step we will follow to complete this tutorial.again go to the software section and click on the PHP processes and hit the kill process button.
Now we can use your PHP ZIP Extension our website.
welcome back to shortlearner.com, in this post we will see how to send forgot password on mail with the help of PHP. So in the very step we establish our database connection in connection.php file than we include it in our send.php file. connection.php