Jump to content

runeveryday

Members
  • Posts

    122
  • Joined

  • Last visited

    Never

Everything posted by runeveryday

  1. php addtype: "While some users prefer to use PHP in conjunction with the .html extension, keep in mind that doing so will ultimately cause the file to be passed to PHP for parsing every single time an HTML file is requested.Some people may consider this convenient, but it will come at the cost of performance." can't catch up with this paragraph. supposeed a file's suffix is .html,there is no php in it. does it to be passed to PHP for parsing ? if no, why the above says "keep in mind that doing so will ultimately cause the file to be passed to PHP for parsing every single time an HTML file is requested"
  2. function url($array) { $gets = $_GET; $gets = array_merge($gets,$array); return '?'.http_build_query($gets); } i can't catch up with the above code. hope someone can give me more explaination. as i know, the first is give the GET array to a variable named $gets. then merge it. and return the query string. i don't know why i shoud do this line ($gets = array_merge($gets,$array); ).thank you.
  3. if i will have bought that font,how to use it in my site for anyone can access it. even if there is no that font in his computer.
  4. http://www.sewweekly.com/ i want to use the same type font on the above link's site to my site .how to get that?when i do a test on my local computer,i use the same font-family as the site.but i couldn't get the same effect.thank you.
  5. class 1: class HelloWorld { public $world; function getHtml() { return "<html><body>". "Hello, ".$this->world."!". "</body></html>"; } } class2: class HelloWorld { public $world; function __construct($world) { $this->world = $world; } function getHtml() { return "<html><body>". "Hello ".$this->world."!". "</body></html>"; } } i don't know why in class 2 it uses a construct function. i feel it is unnecessary .any tips would be appreciated.
  6. i have read it in php manual before i asked this question here,but i still don't know .how to use ob_start? shoud we use this function?
  7. <?php ob_start(); $er = error_reporting(0); what's the above code meaning?and what it will do?
  8. how to install PHP which is run as an Apache module, or run as CGI on debain .any tips would be appreciated
  9. how to write a script to overwrite so there will be only 5 entries at any time?
  10. if i want to put every url into a database table, with the time going , the table will become larger and larger.so, i want to let the database only save one day 's records。 when a new day comes, the old day's record will be deleted. is there a way to get this?
  11. now i use this code to show where the visitors came from to my site. <?php $referer=$_SERVER['HTTP_REFERER']; echo $referer; ?> now, i want to show the 5 latest vistors referer's site url on my site ?
  12. can't understand the above,the paragraf is from a book.anyone helps.thank you,
  13. if i use a Top Level Domains instead,how to do it ?thank you.
  14. i want to make a tool. like this http://www.yougetsignal.com/tools/web-sites-on-web-server/
  15. i want to get all the domain name on the internet and put them into a database. is there a way to get this.
  16. oh,where is 27 ? if $i=28, "if (!checkdate($month, 28, $year))" it will return 27($i-1). thank you.
  17. can't know about this INNER JOIN sales on agents.agent_id = sales.agent_id INNER JOIN items on sales.item_id = items.item_id
  18. $result = mysql_query("SELECT area, agent_name, item_name, quantity, item_price, (quantity*item_price) as total FROM agents INNER JOIN sales on agents.agent_id = sales.agent_id INNER JOIN items on sales.item_id = items.item_id ORDER BY area ASC"); what about this query mean? any tips would be appreciated
  19. many thanks,got it, now,$days[] is an arry,which value is sat,aun,mon..the rest i also don't catch up with it. i don't find the place that declare this $starting_day variable. for ($i=0; $i<$starting_day; $i++) $days[] = " "; for ($i=1; $i< ($total_day_of_month+1); $i++) $days[] = $i;
  20. in this line , foreach (array_keys($week_days) as $day),why this array_keys($week_days) is not $week_days.why it use array_keys($week_days).
  21. $date = "10/01/2005"; $week_days = array("Sat"=>1, "Sun"=>2, "Mon"=>3,"Tue"=>4,"Wed"=>5, "Thu"=>6,"Fri"=>7); $total_day_of_month = get_total_day($date); $starting_day = $week_days[Date("D",strtotime($date))] - 1; foreach (array_keys($week_days) as $day) $days[] = $day; for ($i=0; $i<$starting_day; $i++) $days[] = " "; for ($i=1; $i< ($total_day_of_month+1); $i++) $days[] = $i; $smarty->assign("title","October 2005"); $smarty->assign("special_days", $days); $smarty->display("calendar.tpl"); function get_total_day($date) { $time_stamp = strtotime($date); $month_ar = split("/", $date); $month = $month_ar[0]; $year = Date("Y",$time_stamp); for ($i=28; $i<33; $i++) { if (!checkdate($month, $i, $year)){ return ($i - 1); } } } this code is from a php file,which use the smarty template.can't understand the get_total_day($date) function,why the $i value starts from 28,and ends on 32.any tips would be appreciated.
  22. i have created a form,which can look for the alexa ranking.but some people hotlink the looking for results from my site.how to prevent it. thank you.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.