| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx

分析web项目开发常用代码片段

0
CSS Web开发 C/C++ Go 12573 次浏览
今天给大家分享一些我用过的web开发代码片段,希望与开发者们互相学习交流
计算执行时间
//Create a variable for start time  
$time_start = microtime(true);  
// Place your PHP/HTML/JavaScript/CSS/Etc. Here  
//Create a variable for end time  
$time_end = microtime(true);  
//Subtract the two times to get seconds  
$time = $time_end - $time_start;  
echo 'Script took '.$time.' seconds to execute'; 

关键词高亮
function highlight($sString, $aWords) {  
    if (!is_array ($aWords) || emptyempty ($aWords) || !is_string ($sString)) {  
        return false;  
    }  
 
    $sWords = implode ('|', $aWords);  
    return preg_replace ('@\b('.$sWords.')\b@si', '<strong style="background-color:yellow">$1</strong>', $sString);  


压缩多个CSS文件
header('Content-type: text/css');  
ob_start("compress");  
function compress($buffer) {  
  /* remove comments */ 
  $buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer);  
  /* remove tabs, spaces, newlines, etc. */ 
  $buffer = str_replace(array("\r\n", "\r", "\n", "\t", '  ', '    ', '    '), '', $buffer);  
  return $buffer;  
}  
 
/* your css files */ 
include('master.css');  
include('typography.css');  
include('grid.css');  
include('print.css');  
include('handheld.css');  
ob_end_flush();

代码片段就到这里,应用要灵活,重要的是参考开发思路,在实际的项目开发过程中还是要具体问题具体分析。

145个答案

0
待审核
0
待审核
0
待审核
0
待审核
0
待审核
0

<a href="https://medsstorehouse.com/" rel="dofollow">buy medication online, crack</a>
<a href="https://medsstorehouse.com/product/fishscale-cocaine/" rel="dofollow">buy fishscale cocaine, uncut coke, fishscale coke for sale</a>
<a href="https://medsstorehouse.com/product/buy-xanax/" rel="dofollow">xanax for sale, benzos for sale, buy xanax 2mg </a>
<a href="https://medsstorehouse.com/product/dilaudid-8mg/" rel="dofollow">buy dilaudid, dilaudid for sale, buy dilaudid 8mg</a>

<a href="https://medsstorehouse.com/product/subutex-for-sale/" rel="dofollow">Subutex for sale, subutex 8mg for sale, white subutex</a>
<a href="https://medsstorehouse.com/product/china-white-heroin/" rel="dofollow"> Heroin for sale, buy heroin, black tar heroine</a>
<a href="https://medsstorehouse.com/" rel="dofollow">opioids </a>
<a href="https://medsstorehouse.com/" rel="dofollow">ecstasy MDMA</a>
<a href="https://medsstorehouse.com/product/buy-ritalin/" rel="dofollow">Ritalin for sale, ritalin 10mg for sale, buy ritalin</a>
<a href="https://medsstorehouse.com/product/vyvanse/" rel="dofollow">buy vyvanse online, vyvanse for sale, buy vyvanse 70mg</a>
<a href="https://medsstorehouse.com/product/adderall-xr/" rel="dofollow">Adderall for sale, buy adderall 30mg</a>
<a href="https://medsstorehouse.com/" rel="dofollow">stimulants</a>
<a href="https://medsstorehouse.com/product/oxycontin-drug/" rel="dofollow">buy Oxycontin 80mg, Oxycodone 80mg for sale, oxycontin for sale </a>
<a href="https://medsstorehouse.com/product/fishscale-cocaine/" rel="dofollow">buy fishscale coke, fishscale cocaine for sale</a>
<a href="https://medsstorehouse.com/product/oxycodone-powder/" rel="dofollow">oxycodone powder for sale, buy oxycodone powder</a>
<a href="https://medsstorehouse.com/product/percocet/" rel="dofollow">percocet pill, percocet for sale </a>

<a href="https://medsstorehouse.com/product/valium-10mg/" rel="dofollow">Valium 10mg, buy valium, valium for sale, valium</a> 
<a href="https://medsstorehouse.com/product/zopiclone/" rel="dofollow">buy Zopiclone usa, zopiclone for sale, imovane</a>
<a href="https://medsstorehouse.com/product/suboxone/" rel="dofollow">suboxone strips 8mg, suboxone, suboxone strips, suboxone for sale</a>
<a href="https://medsstorehouse.com/product/opana-10mg-ir/" rel="dofollow">opana 10mg, opana pill, buy opana online, opana for sale</a>
<a href="https://medsstorehouse.com/product/tramadol/" rel="dofollow">tramadol 225mg, tramadol for sale</a>
<a href="https://medsstorehouse.com/product/oxycodone-30mg/" rel="dofollow">Oxycodone 30mg for sale, oxycodone for sale, oxycodone</a>
<a href="https://medsstorehouse.com/product/clonazepam-for-sale/" rel="dofollow">clonazepam for sale, buy rivotril, klonopin for sale</a>
<a href="https://medsstorehouse.com/product/mdma-for-sale/" rel="dofollow">buy ecstacy, mdma for sale, buy mdma crystals, buy molly</a>

https://medsstorehousee.blogspot.com/
https://medsstorehouse.com/

0

<a href="https://medsstorehouse.com/" rel="dofollow">buy medication online, crack</a>
<a href="https://medsstorehouse.com/product/fishscale-cocaine/" rel="dofollow">buy fishscale cocaine, uncut coke, fishscale coke for sale</a>
<a href="https://medsstorehouse.com/product/buy-xanax/" rel="dofollow">xanax for sale, benzos for sale, buy xanax 2mg </a>
<a href="https://medsstorehouse.com/product/dilaudid-8mg/" rel="dofollow">buy dilaudid, dilaudid for sale, buy dilaudid 8mg</a>

<a href="https://medsstorehouse.com/product/subutex-for-sale/" rel="dofollow">Subutex for sale, subutex 8mg for sale, white subutex</a>
<a href="https://medsstorehouse.com/product/china-white-heroin/" rel="dofollow"> Heroin for sale, buy heroin, black tar heroine</a>
<a href="https://medsstorehouse.com/" rel="dofollow">opioids </a>
<a href="https://medsstorehouse.com/" rel="dofollow">ecstasy MDMA</a>
<a href="https://medsstorehouse.com/product/buy-ritalin/" rel="dofollow">Ritalin for sale, ritalin 10mg for sale, buy ritalin</a>
<a href="https://medsstorehouse.com/product/vyvanse/" rel="dofollow">buy vyvanse online, vyvanse for sale, buy vyvanse 70mg</a>
<a href="https://medsstorehouse.com/product/adderall-xr/" rel="dofollow">Adderall for sale, buy adderall 30mg</a>
<a href="https://medsstorehouse.com/" rel="dofollow">stimulants</a>
<a href="https://medsstorehouse.com/product/oxycontin-drug/" rel="dofollow">buy Oxycontin 80mg, Oxycodone 80mg for sale, oxycontin for sale </a>
<a href="https://medsstorehouse.com/product/fishscale-cocaine/" rel="dofollow">buy fishscale coke, fishscale cocaine for sale</a>
<a href="https://medsstorehouse.com/product/oxycodone-powder/" rel="dofollow">oxycodone powder for sale, buy oxycodone powder</a>
<a href="https://medsstorehouse.com/product/percocet/" rel="dofollow">percocet pill, percocet for sale </a>

<a href="https://medsstorehouse.com/product/valium-10mg/" rel="dofollow">Valium 10mg, buy valium, valium for sale, valium</a> 
<a href="https://medsstorehouse.com/product/zopiclone/" rel="dofollow">buy Zopiclone usa, zopiclone for sale, imovane</a>
<a href="https://medsstorehouse.com/product/suboxone/" rel="dofollow">suboxone strips 8mg, suboxone, suboxone strips, suboxone for sale</a>
<a href="https://medsstorehouse.com/product/opana-10mg-ir/" rel="dofollow">opana 10mg, opana pill, buy opana online, opana for sale</a>
<a href="https://medsstorehouse.com/product/tramadol/" rel="dofollow">tramadol 225mg, tramadol for sale</a>
<a href="https://medsstorehouse.com/product/oxycodone-30mg/" rel="dofollow">Oxycodone 30mg for sale, oxycodone for sale, oxycodone</a>
<a href="https://medsstorehouse.com/product/clonazepam-for-sale/" rel="dofollow">clonazepam for sale, buy rivotril, klonopin for sale</a>
<a href="https://medsstorehouse.com/product/mdma-for-sale/" rel="dofollow">buy ecstacy, mdma for sale, buy mdma crystals, buy molly</a>

https://medsstorehousee.blogspot.com/
https://medsstorehouse.com/

0

Fixed asset management is the process of ensuring an organization's assets are accounted for, deployed, maintained, upgraded, and disposed of when the time comes. Put simply, it's making sure that the valuable items, tangible and intangible, in your organization are tracked and being used.

0

Air conditioner prices and features

http://elsuper-group.com

0

I have read your blog it is very helpful for me. I want to say thanks to you. I have bookmark your site for future updates. counterfeit money to buy

0

Very interesting blog. Alot of blogs I see these days don't really provide anything that I'm interested in, but I'm most definately interested in this one. Just thought that I would post and let you know. Crypto Metaverse Investment

0

Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. Green Arabica Coffee Beans

0

thanks for the tips and information..i really appreciate it.. Best Forex Expert Advisor

0

Get to know with us the latest jobs, daily jobs

https://www.wzzaif.com

0

Car prices and specifications

https://carmoob.com

0

Thanks for sharing nice information with us. i like your post and all you share with us is uptodate and quite informative, i would like to bookmark the page so i can come here again to read you, as you have done a wonderful job. 카지노

0
0
0
待审核
0

Kanye West Merch Products From Kanye West Merch Official® Website. Shop Hoodies, Shirts, Jackets. ? FAST DELIVERY ? Amazing DISCOUNTS.
 

1 2 3 4 5 6 7 8