My Domain
My new domain: www.cbdmall.com
Right now, I direct it to my home ip, since I still cannot find a satisfactory host for my project. Maybe I should foward it to my VMWare if possible, that will make things much easier.
My new domain: www.cbdmall.com
Right now, I direct it to my home ip, since I still cannot find a satisfactory host for my project. Maybe I should foward it to my VMWare if possible, that will make things much easier.
Posted by (Victor) Xi Wang at 9:53 AM 1 comments
my words DMT Project
I have learned a good example to display a bar chart in PHP, and I added a loop
statement, so the length of the bar can fit for the width of the browser.Since the blog will filt a lot of html and PHP tags, I will pulish the final result in my online host. The main idea is to set the a table's cellpadding>=2, and then set bgcolor's length flexible to the cell in which a bar is displayed. In other word, the bgcolor length is directly propotional to the amount we defined.
Posted by (Victor) Xi Wang at 12:07 AM 0 comments
my words php
when make the body tag "float", everything mass up...... That's true
body cl*ss="interesting"
in css file:
interesting {
float: left;
}
guess what, the whole page's layout will be changed, especially padding and margin....
I have discussed this with Tim, but still don't know exactly the reason.
I guess this is a kind of bug in firefox when it tries to compile FLOAT tag
Posted by (Victor) Xi Wang at 12:07 AM 0 comments
my words CSS
I spend a whole weekend to work on LAPP. Just a little different from the popular term of "LAMP"(Linux+Apache+MySQL+PHP), 'cause mine is Linux+Apache+PHP+PostgreSQL :p
Here is the my install log for the whole staff (I set up a server in VMware, so I can check my results and fix bugs before submitting to a public server).
1. Download Ubuntu
2. Create a new ubuntu operation system in VMware, boot from Ubuntu6 iso file
3. After the system is done, use apt-get command or package management to install Apache2, PHP5, PostgreSQL8. The following additional modulates should be included:
4. Configure PostgreSQL setting:
5.Networking config
6 files are involved:
· /etc/hosts (signed computer name to IP address)
· /etc/networks (associate domain with IP address)
· /etc/sysconfig/network (open or close network, config computer name and gateway)
· /etc/resolv.conf (add DNS server IP)
· /etc/rc.d/rc3.d/S10network (as a wizard to activate the ethnet)
· /etc/sysconfig/network-scripts
Configure IP, directly edit /etc/network/interfaces,static IP can be edited as following:auto lo eth0iface lo inet loopbackiface eth0 inet staticaddress 192.168.2.2 netmask 255.255.255.0 broadcast 192.168.2.255 gateway 192.168.2.1
If assigned by DHCP, edit as: auto eth0iface eth0 inet
Command line is a better way:
ifconfig -a # display the network confi# ifconfig eth0 inet down #stop network # eth0ifconfig eth0 inet up 192.168.1.2 \netmask 255.255.255.0 broadcast 192.168.1.255 #config IP address netmask # add default gw 192.168.1.1 eth0 #gateway config#
When done, restart the networking: /etc/init.d/networking restart
6. Test web server
Change to the directory /var/www/ create a file, named info.php, add to it. Type the URL : 127.0.0.1/info.php in a browser, php config info will be displayed.
Create a file named pg_connect.php, add text:
//connect pgsql test//
$linkid = @pg_pconnect("host=localhost dbname=test user=postgre password=secret")
or die("Could not connect to the PostgreSQL server.");
$result= @pg_query("SELECT* FROM mytable") or die("The query failed");
//out put the result//
while($row=pg_fetch_object($result)) echo "No.$row->id is ($row->name)
";
?> # this will check PHP+PostgreSQL successuful or not #
7. Configure virtual host for different domain
/etc/apache2/sites-available/default is the default rule for domain root.Posted by (Victor) Xi Wang at 6:10 PM 4 comments
http://students.mim.iml.uts.edu.au/users/10530982/test.html
I also use the page as CSS practice field. So the style effect may change sometimes.
Posted by (Victor) Xi Wang at 5:53 PM 0 comments
my words CSS, DMT Project
I used to create some simple web page by Macromedia's Dreamweaver. This powerful tool generates various CSS code with several simple clicks, so I never try to learn style design myself. But when I got this blog, I was desperate by the templates provided--the color, the frame width, the picture size definitions. Time to change this, also time to learn... Several days later, it looks like what you have seen now. I have adjusted every detail I didn't like... Also, some advanced skills can be learned in book "Bulletproof Web Design: Improving flexibility and protecting against worst-case scenarios with XHTML and CSS". It contains 10 cases about CSS application. I benefit a lot from the first three cases. Although I have not read though the book, but I wanna created a page using the methods it mentioned.
Combining use of Div Tags, Float, Padding and Margin, sometimes, would be an alternative to complex tables and forms that traditional web page design involved. But tables are still important elements in web pages, and some CSS on table would be useless if we overlook some pre-defined rules. Still, some seldom used tags in table do have their special features:
http://www.w3.org/TR/html401/struct/tables.html
I have spend a whole day to check my documents and figure out what I should learn in DMT course. I have great interest in e-commerce, which need DMT things a lot.
In fact, I should learn a lot about DMT, not just for the course, but just for my future. XHTML, PHP, SQL, Java Script, XML,... too many programming things I should learn. I used to like to learn from delicately planned lectures. In Tim's class, I smelt sth. different: I have to plan for myself.
I have read some books about HTML and CSS, but can hardly remember the tags' meaning. I have learned sth about PHP, but it is superficial, and I even didn't try to set a dynamic website for my own. I know sth about SQL, XML... but never use them in any on-hand practice. Finally, I got a picture of myself: what I need is to do some work really through my hands. And I aim to get familiar the whole development process from the very beginning.
It's said that PostgreSQL has all the all the modern db features. So I wanna have a try on it. Then I choose Apache+PHP+PostgreSQL on Linux as my publishing platform. I have collected some highly reccommended books/ebooks:
Posted by (Victor) Xi Wang at 10:16 PM 0 comments
my words DMT Project
First, PHP manual should be downloaded from: http://de.php.net/download-docs.php
This official handbook is for all the people who want to learn php, from beginner to experienced PHP programmer. It covers everything!!
Here comes what I want to show you:
Funtionally, PHP is much like JSP. And JS can be included in a PHP file very easily. If you wanna create sth shining and simple, to add some little JS into you php page is a very good choice.
For example, I can simplily create a navigation menu by PHP maybe like this:
http://karlcore.com/programming/dynav/menu.phps
this is a good example to use an array to list everything we want to see. But don't you think it is too stiff or mechanical?
Here is a good way to create a drop-down menu with Java Script:
http://www.thesitewizard.com/archive/navigation.shtml
Let the navigation menu stay in good structure and make it a little bit cool! This simple Java Script can manage that.
Here is one more step before you can see your improved menu (in fact, it is also mentioned in the article), you need your PHP file to get into the Java Script and use it! Just simply use a 'include' function in PHP. JS will be parsed rightly into your php environment. Enjoy!
Posted by (Victor) Xi Wang at 1:12 AM 0 comments