Showing posts with label scripts. Show all posts
Showing posts with label scripts. Show all posts

Monday, 22 February 2016

How to Read an XLS File in PHPIn Feburary 2016 22,

In Feburary 2016 22,
Go to the PHP Excel Reader download site, and download the package called 'php-excel-reader' (see Resources).
Unzip the downloaded file by double-clicking on it.
Upload the file called 'excel_reader2.php' to your website. Use FTP or your Web hosting service's file upload service to do this. The file should be placed in a folder where your PHP scripts can find it. You can put it in the same folder as the PHP script you wish to read Excel files in, or you can put it in a folder that is in the 'include path.' The 'include path' is a set of folders where you can put files that your PHP script will always be able to find, even if your script is in a totally different place. Your website might have a folder called 'includes' that is in the include path. If it does, put 'excel_reader2.php' there. If it doesn't, put it in the same folder as the PHP scripts with which you wish to use it.
Read an XLS File
Upload an Excel file to use as an example. Create a simple Excel file, and save it as 'example.xls'. Open the file and fill in the first three columns of the first row with the words 'column 1', 'column 2' and 'column 3'. Then on the second row, fill the first three columns with the text '1-1', '2-1' and '3-1'. Then fill the first three columns of the third row with the text '1-2', '2-2' and '3-2'. Save the file and upload it to the same folder where you uploaded excel_reader2.php.
Open your favorite text editor, and save a text file called 'example.php'. This will be your PHP script for this tutorial.
Write your PHP script to open the Excel file, read the table of data and then print the data out in the user's Web browser. Use this code to do it:
rowcount(); $r++) { //walk through each rowfor ($c = 1; $c
colcount(); $c++) { //walk through each column
echo $xls->raw($r, $c) . ' '; //Display the data in that cell
}echo '\n'; //make a new line at the end of each row} echo '
'; //close the HTML we made earlier?>
Save and upload your PHP file to your website. If you were able to put PHP Excel Reader in the include path, you may put your PHP file wherever you wish. If not, put your PHP file in the same folder as PHP Excel Reader.
To check your work, visit example.php in your Web browser. You should see the table of data from your Excel file printed in your browser window.
In Feburary 2016 22,

Tuesday, 9 February 2016

What is Web Hosting?In Feburary 2016 09,

In Feburary 2016 09,
Web hosting is the method in which surfers of the web can successfully browse the Internet. A web server is a computer that sends the information for a personal or a business site to the Internet. Web hosting companies provide servers to its clients with the options of presenting information, files, pictures and bandwidth for the traffic its website brings in. This is a convenient technique for people to place ideas, products or personal touches on the World Wide Web.
Significance
The purpose for web hosting is practicality. A person with no website experience can create a meaningful site just like a knowledgeable professional. You do not need a web host to create a site linked to the Internet. However, setting up a server from your personal PC takes in-depth understanding that most people do not want to take the time to learn. That is why web-hosting companies provide simple access to the Internet. Anyone can create a site and have it viewed by millions.
Types
There are several styles of web hosting services. This depends on the type of website you have created. Websites that are more complex contain scripts, user generated information or an automated system requires CGI or PHP scripts. This method to have your script properly displayed is available by some companies while others do not offer this technique.
Free website hosting is rare. This style has advertisements in the form of banners or pop-ups. The free companies offer limited functions for clients. Typically, a person that has does not require large traffic and space or involve scripts uses this type of service.
Dedicated hosting is a method in which the client has free range of their website and functionality. The service is unshared, which will give the business or person more bandwidth, which leads to higher traffic margins. Flexibility is the key when using a dedicated server. You will be able to choose your hardware and operating system for your special needs. This gives you complete control over the server. You are required to have in-depth knowledge of web hosting services before you can completely use a dedicated web hosting company.
Shared hosting is the most common style for businesses and personal use. This is when your website is on a server with a couple of hundred others. You upload your website through a browser or an FTP. Then you can make changes on your website directly from the server's control panel. Shared hosting offers a setup for any scripts your website requires. In addition, they will not apply advertisements to your website.
Benefits
When you run a website, you will need a domain name for others to find you. Your webpage is linked to this address. Most companies that require payment for their services offers you to choose a domain name free of charge. Some may ask for a small yearly fee to have the domain name of your choice. In addition, using a web hosting server allows you to have the freedom of allowing your content to be seen on the World Wide Web. You can have the benefit of having your company or personal page put on one search engine or several different ones.
Analysis
Choosing a web hosting company may be a difficult task. There are several functions and considerations that you should be aware. Most companies provide a list of its benefits on the company's webpage. However, it may be difficult to understand what it is that you are actually receiving from them.
A business website requires extensive scripts to run. This includes payment methods, forms to fill out and pictures to show your products. A successful business should have plenty of bandwidth to keep up with the traffic. They should also have a simple to manage control panel where you can change what you need and leave quickly. Time is money and the simplest options are required. You will also need to decide if your company is worth a dedicated server or if a shared server will be enough for your growing business.
A personal website does not need much consideration. Blogs, family or friend pictures and information that you wish to share with the world is usually the normal webpage. You could also have a form or another method where people can share their thoughts, like a guest book. A form is a simple script but you will need to have your web host be able to run scripts. Free or shared web hosting services are capable of running a personal site. Remember, free hosting companies often require advertisements on your page.
In Feburary 2016 09,