Linux/PHP:
724浏览量
<?php $dwj=date("d");
if($dwj==16 or $dwj==17 or $dwj==18){
?>
<div style="width:1040px;margin:0 auto;height:0px;position: relative;">
<div id="jieri"
612浏览量
$str = 'img src="abcccccccccc" ';
$str = preg_replace('/src=".*?"/', 'src="helloworld"', $str);
echo $str;
610浏览量
if (!file_exists($file)) {
echo "erro";
exit ();
} else {
$fl = fopen( $file, "r" );
header("Content-Type:application/octet-stream");
header("Accept-Range
614浏览量
在kindeditor/php/upload_json.php修改:$max_size = 5*1024*1024; //5M
635浏览量
nginx 出现413 Request Entity Too Large问题的解决方法使用php上传图片(大小1.9M),出现 nginx: 413 Request Entity Too Large 错误。根据经验是服务器限制了上传文件的大小,但php默认的文件上传是2M,应该不会出现问题。打开php.ini,把 upload_max_filesize 和 post_max_size 修改为20M,然后重启。再次上传,问题依旧,可以排除php方面的问题。原来nginx默认上传文件的大小是1M,可
537浏览量
PHP中的循环结构大致有for循环,while循环,do{} while 循环以及foreach循环几种,不管哪种循环中,在PHP中跳出循环大致有这么几种方式:代码:<?php
$i = 1;
while (true) { // 这里看上去这个循环会一直执行
if ($i==2) {// 2跳过不显示
&nbs
528浏览量
base64_encode将字符串以 BASE64 编码。语法: string base64_encode(string data);返回值: 字符串函数种类: 编码处理base64_decode将 BASE64 编码字符串解码。语法: string base64_decode(string encoded_data);返回值: 字符串函数种类: 编码处理
593浏览量
首先加个输出类型header('Content-Type: image/png');其次加个清除缓存ob_clean()<?php
header('Content-Type: image/png');
//引入phpqrcode库文件
include('phpqrcode.php&
677浏览量
一、淘宝网APIAPI地址: http://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=15850781443 参数: tel:手机号码 返回:JSON二、拍拍APIAPI地址: http://virtual.paipai.com/extinfo/GetMobileProductInfo?mobile=15850781443&amount=10000&callname=getPhoneNumIn
789浏览量
在写程序的时候,发现在用户的时候记录IP和地区信息也许以后用得上,去网上找了找,发现实现的方式有好多好多,因为我用的ThinkPHP,后来又去TP官网找了找,最后采用了下面这种方法。<?php
/**
* IP 地理位置查询类
* 由于使用UTF8编码 如果使用纯真IP地址库的话 需要对返回结果进行编码转换
*/
class IpLocation {
&nbs