// Start a session session_start(); if (!session_is_registered("auth")) { session_register("auth"); } $sessionId=session_id(); // open the mysql connection, $auth = false; // Assume user is not authenticated if (isset( $PHP_AUTH_USER ) && isset($PHP_AUTH_PW)) { $msqusername="phurteau"; $msqpassword="p41r64h"; $msqdbname="120158_1"; mysql_connect('localhost',$msqusername,$msqpassword); mysql_select_db($msqdbname); $tablename = "ccphaccess"; // makes this hunk more portable // Check username and password agains the database. $cmdstr = "select china from ccphaccess where ((loginid='$PHP_AUTH_USER') && (password='$PHP_AUTH_PW'));"; $result = mysql_query($cmdstr); $num = mysql_num_rows($result); if ( $num != 0 ) { $auth = true; } } if ( ! $auth ) { header( 'WWW-Authenticate: Basic realm="Creative Connnections Adventures"' ); header( 'HTTP/1.0 401 Unauthorized' ); echo 'Authorization Required.'; exit; } else { ?>
Ban
Tu Er Fei -- Giving
Up Half Way
The Story behind the Idiom
Once upon a time, a Chinese scholar named Yang Tse left home to study with a master far away. After one year, he missed his wife terribly; so, he decided to go home and see her. Extremely excited, he stepped into his house to find his beloved wife weaving quietly beside the door. She was surprised to see him and asked if he had finished his studies. Thinking that she would be deeply touched, he told her he came back early because he missed her very much.
To his bewilderment, his answer seemed to upset his wife tremendously. She took out a pair of scissors and said, "Look, I work on the loom day after day and week after week to weave those single threads of silk into an entire piece of cloth. If I cut the cloth now, all my efforts would be wasted. Your job as a student is to accumulate knowledge day after day, week after week and year after year. If you give up now, isn't it the same as cutting my threads?"
Yang Tse was shocked and moved. He went back to the school and didn't return home again until seven years later when he finally obtained his degree.
The
Idiom
The Chinese idiom ban tu er fei, which comes from this story,
means 'to give up at half way.' The
story is well-known in every Chinese household. While it might seem exaggerated
from a modern perspective, it reinforces a deeply respected virtue in Chinese
culture: persistence, especially
in the face of challenging circumstances .
Example: If you ban tu er fei now, you will never become the great basketball player that you want to be.
Next Idiom
-->
Back to Chinese Idiom Grab Bag Main Page
Chinese
Idiom Grab Bag |
© 2007 OneWorld Classrooms. All rights reserved.