How to create a CSV file using PHP easily
In this video I have shown how to create a CSV file using PHP. The example is shown with the help of XAMPP server installed in windows 10 PC. The below code can be used to create a CSV file. <?php header(“Content-type: text/plain”); header(“Content-Disposition: attachment; filename=jinu.csv”); echo ‘”jinu”,”jawad”,”one”,”two”‘.”\n”; echo ‘”jinu”,”jawad”,”one”,”two”‘.”\n”;; echo ‘”jinu”,”jawad”,”one”,”two”‘.”\n”;; for ($x = …
Read a CSV file using PHP
In this video,I have shown how to read a CSV file using PHP. 1. Below code can be used to read the CSV file and show it exactly as a table in the PHP page. <?php echo ‘<table border=”1″>’; $start_row = 1; if (($csv_file = fopen(“F:\\readcsv\\country.csv”, “r”)) !== FALSE) { while (($read_data = fgetcsv($csv_file, 1000, …
How to open any File in Java
In this video, I have shown how you can open any type of file using java. Code is shown below. package test; import java.io.File; public class open_file { public static void main(String[] args) { String path = “E:\\jinu.txt”; File file = new File(path); try { if (file.exists()) { Process pro = Runtime.getRuntime().exec(“rundll32 url.dll,FileProtocolHandler ” …
Writing 10 Million rows to a text file using PHP
In this video I have shown how you can create a text file with 10 million rows in that using PHP. This example is shown in a XAMPP server. Below given code will create the file. <?php header(“Content-Type: text/plain”); header(‘Content-Disposition: attachement; filename=”jinujawad.txt”‘); for ($x = 0; $x <= 1000000; $x++) { echo “The number is: …
Create shortcut to change the IP address of the PC
In this video I have shown how you can create a short cut to change the IP address of your PC. This method will work in all windows versions and it is done with the help of Command prompt bat file. 1 . First find the name of the adapter you want to change the …
ORA-12560: TNS:protocol adaptor error SOLVED
In this video I have shown how you can solve the error ORA-12560: TNS:protocol adaptor error.This error comes when the oracle service ‘OracleServiceORCL’ gets stopped in the PC or Server. Here I have shown you 2 methods to solve it. Method 1 – Turn on the service from windows services1. Open run window by pressing …
How to reset MySQL root Password
In this video I have shown step by step how you can reset the MySQL root password in a windows PC. Login to your PC as Administrator Mode Stop all MySQL services or APPS that is using MySQL in your PC.First open the services from windows. Press the Win + R keys on your keyboard, …
Reset PostgreSQL password on Windows
In this video I have shown how to reset the forgotten password of PostgreSQL on windows 10 PC. 1. First locate the pg_hba.conf file inside the installation directory of PostgreSQL. In this example the file is located in ‘C:\Program Files\PostgreSQL\12\bin’. 2. Open the file in notepad and comment the below lines by putting # at …
Send SOAP Request with custom variables and read XML response from PHP page
In this video I have shown how we can send XML request with custom variables set from a HTML form. The XML Response received is parsed and shown in same page. For testing this, I have found the website holidaywebservice.com which will give response for XML request we send. 1. The Sample XML Request we …
Create excel file in PHP without using any libraries
In this video I have shown you how you can create excel file in PHP without using any libraries. Just add 2 lines of code mentioned below in your php page. The page will create an excel file and download it. header(“Content-type: application/vnd.ms-excel”); header(“Content-Disposition: attachment; filename=chillyfacts.com.xls”); The example page I shown in the video is, …