Tech Blog
A blog for php,java,mysql and web developers.
Sunday, 13 January 2013
Syntax highlighter java
import java.io.*;
public static void main(String args[])
{
System.out.println("sample test");
}
Syntax highlighter samplea
<?php
$example = range(0, 9);
foreach ($example as $value)
{
echo $value;
}
How to Install Smarty on Windows
Installing Smarty on Windows
This document assumes that you have configured PHP5, Apache Webserver already.- Download Smarty
- Unzip the content of Smarty zip file to smarty folder. So it appears as C:/server/smarty
- Create two folders templates_c and cache inside it. So it appears as C:/server/smarty/templates_c and C:/server/smarty/cache
- Browse to PHP Installation Directory and edit php.ini's include_path and add the location of the libs folder. Example: include_path = ".;C:/server/smarty/libs/;"
- Restart IIS/Apache
- Create a new folder in htdocs (root) folder and rename it to smarty. C:\server\htdocs\smarty
- Create two folders configs and templates inside it. C:\server\htdocs\smarty\configs and C:\server\htdocs\smarty \templates
- Smarty configuration is done. Create two scripts index.php and index.tpl to test Smarty template engine.
- Place index.php inside C:\server\htdocs\smarty and index.tpl inside C:\server\htdocs\smarty \templates
- Open the web browser and type in the URL http://localhost/smarty.
index.php
<?php
// load Smarty library
require('Smarty.class.php');
$smarty = new Smarty;
$smarty->template_dir = ‘C:\server\htdocs\smarty \templates’;
$smarty->conf ig_dir = ‘C:\server\htdocs\smarty\configs’;
$smarty->cache_dir = ‘C:/server/smarty/cache’;
$smarty->compile_dir = ' C:/server/smarty/templates_c’;
$smarty->assign('name','Lucky!!');
$smarty->display('index.tpl');
?>
index.tpl
<html>
<body>
Hello, {$name}
<body>
<html>
Saturday, 29 December 2012
How to connect GPRS in china mobile
Step 1:
1.Goto settings.
2.CONNECTION->Data accounts.
3.Edit CMWAP GPRS.
4.Account name(any name you wish to have).
5.APN->(your accesspoint name e.g."airtelgprs.com").
6.username and password->(leave it blank).
7.Auth. Typd->Normal.
8.DNS->0.0.0.0
Now you have successfully configured the internet settings in your phone.Now follow step2 to finish the process to connect to Internet.
Step2:
1.After editing the settings save and go back for once.
2.Goto Wap settings.
3.Under Wap profiles select CHINA MOBILE WAP.
4.Edit and give home page to http://www.google.com.
5.Proxy->0.0.0.0
6.Port->80
7.Data accounts->select the Data account you saved in step1.
8.Save and Back.
9.Profile settings->select the wap profile you saved in the previous step.
10.Goto your wap browser and select Goto Homepage.HOPE you see Google home page.
Friday, 28 December 2012
How to set HOME variable in windows 7
You need to add an environment variable: This is how i did it on windows 7
|
Sunday, 9 September 2012
Configuring Zend Framework for PHP on Windows
First download and extract the Zendframework 1.1.11.zip to C:/server and rename Zendframework 1.1.11 to Zendframework
Configuring
php.ini
Find
;include_path = ".;c:\php\includes"
Replace
;include_path =
".;c:\php\includes;C:\ZendFramework\library\zend"
Adding Environment variable
- · Right click My Computer | Properties|Advance Settings |Advanced |Environment Variable
- · Select User Variable for Admin
- · Select PATH from System Variable and add
- · Add Path
C:\server\ZendFramework\library\zend
Command Prompt
Go to the bin folder of the zendframework installation path
C:\>cd C:/server/zendframework/bin/zf
C:\>server/zendframework/bin/zf>zf show version
would show the version of the Zend framework successfully installed.
Zend Framework 1.1.11
To create Zend Project use the following command
C:\>server/zendframework/bin/zf>zf create welcome
Subscribe to:
Posts (Atom)