|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Everybody knows phpMyAdmin can export file to Excel format but phpMyAdmin just export .csv file,not real Excel file format. If you are interest in PHP programming and need to export to the real Excel format please check it out !
Example PHP export to XLS file format.
1. Create Function for XLS
function xlsBOF() {
echo pack(“ssssss”, 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);
return;
}
function xlsEOF() {
echo pack(“ss”, 0x0A, 0x00);
return;
}
function xlsWriteNumber($Row, $Col, $Value) {
echo pack(“sssss”, 0x203, 14, $Row, $Col, 0x0);
echo pack(“d”, $Value);
return;
}
function xlsWriteLabel($Row, $Col, $Value ) {
$L = strlen($Value);
echo pack(“ssssss”, 0x204, 8 + $L, $Row, $Col, 0x0, $L);
echo $Value;
return;
}
พิมพ์ใน Terminal
sudo gedit /etc/apache2/sites-enabled/000-default
เพิ่ม
Alias /virtualname/ "/home/me/html/realdirectory/" <Directory "/home/me/html/realdirectory/"> Options Indexes FollowSymLinks MultiViews AllowOverride all Order allow,deny Allow from all </Directory>
Save แล้วปิด แล้วรีสตาร์ท Apache
sudo /etc/init.d/apache2 restart
This tutorial was has been tested on Ubuntu 10.04, 10.10, 11.04, 11.10, 12.04 LTS Precise Pangolin. Also tested in LinuxMint13 and works fine.
Open terminal and Type the command :install it first with
sudo apt-get install tasksel
Now to install LAMP, type the taskel command in terminal :
sudo tasksel
And select LAMP Server:
During the installation you will be asked to insert the mysql root password
Now check if php is working :
$sudo vi /var/www/info.php
and add
<?php phpinfo(); ?>
save and exit
restart apache2 ,
#sudo /etc/init.d/apache2 restart
Now open browser and type :
http://ip/info.php or http://localhost/info.php
Php is installed.
To full manage your lamp Server database, install phpmyadmin
sudo apt-get install phpmyadmin
To login to phpmyadmin, open browser and type :
http://ip/phpmyadmin or http://localhost/phpmyadmin
– ที่มา http://www.unixmen.com/install-lamp-with-1-command-in-ubuntu-1010-maverick-meerkat/