-
Posts
122 -
Joined
-
Last visited
Never
Everything posted by runeveryday
-
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"
-
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.
-
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.
-
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.
-
i am still confused.
-
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.
-
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?
-
<?php ob_start(); $er = error_reporting(0); what's the above code meaning?and what it will do?
-
how to install PHP which is run as an Apache module, or run as CGI on debain .any tips would be appreciated
-
can't understand the above,the paragraf is from a book.anyone helps.thank you,
-
how to get all the domain on the internet?
runeveryday replied to runeveryday's topic in PHP Coding Help
if i use a Top Level Domains instead,how to do it ?thank you. -
how to get all the domain on the internet?
runeveryday replied to runeveryday's topic in PHP Coding Help
i want to make a tool. like this http://www.yougetsignal.com/tools/web-sites-on-web-server/ -
i want to get all the domain name on the internet and put them into a database. is there a way to get this.
-
anyone helps?
-
oh,where is 27 ? if $i=28, "if (!checkdate($month, 28, $year))" it will return 27($i-1). thank you.
-
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
-
$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
-
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;
-
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).
-
$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.
-
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.
-
got it, many thanks