当前位置: 首页 > news >正文

做美术鉴赏网站的心得安卓优化大师手机版

做美术鉴赏网站的心得,安卓优化大师手机版,免费网站建设平台,网站上想放个苹果地图怎么做1、__FILE__表示什么意思? __FILE__:当前文件的完整路径和文件名 __LINE__:当前行 __DIR__:当前文件所在的目录 2、如何获取客户端的IP地址? 通过超全局数组$_SERVER:echo $_SERVER[REMOTE_PORT]; 3、写…
1、__FILE__表示什么意思?

__FILE__:当前文件的完整路径和文件名
__LINE__:当前行
__DIR__:当前文件所在的目录

2、如何获取客户端的IP地址?
通过超全局数组$_SERVER:echo  $_SERVER['REMOTE_PORT'];
3、写出使用header函数跳转页面的语句?
header("Location: https://www.baidu.com");
header("HTTP/1.0 404 Not Found");
4、$str是一段html文本,使用正则表达式去除其中的所有js脚本?
$str= "<body><div>html</div></body><script type='application/json'>alert(111);</script>";. 匹配出换行符以外的所有字符        \n 匹配换行        * 匹配子表达式零次或多次(.|\n) 匹配script标签里面的所有数据      .* 匹配script里面的参数        +匹配一次或多次
1.正则表达式(匹配出js)
$reg="/<script.*>(.|\n)+<\/script>/";
2.正则替换(用空格替换)
$res=preg_replace($reg,"",$str);
echo $res;
5、写出将一个数组里的空值去掉的语句

$arr = [1,"",3];
$newArr=[]; foreach ($arr as $v){ if (!empty($v)){ $newArr[]=$v; } } var_dump($newArr);

6、写出获取当前时间戳的函数,及打印前一天的时间的方法(格式:年-月-日 时:分:秒)
$day=time()-24*60*60;
echo  date("Y-m-d H:i:s",$day);
echo "<br>";
echo date("Y-m-d H:i:s",strtotime("-1 day"));
7、写出php进行编码转换的函数
iconv(转换的编码,转换后的编码,需要转换的)
返回结果: 返回转换后的字符串,失败返回false
$str = "你好hh";
echo  strlen($str);
$str1=iconv("UTF-8","GBK",$str);
echo $str1;
8、$str = “1,3,5,7,9,10,20”,使用什么函数可以把字符串str转化为包含各个数字的数组?
$str = "1,3,5,7,9,10,20";
$arr=explode(",",$str);
var_dump($arr);
9、serialize() /unserialize()函数的作用

序列化是将变量转换为可保存或传输的字符串的过程 

反序列化就是在适当的时机把字符串再转换为变量

 注意:序列化对象无法序列化对象的方法 

class Person
{public $name="jack";public function test(){echo "测试方法";}
}
$person=new Person();
$ser=serialize($person);
var_dump($ser);
echo "<br>";
$unser=unserialize($ser);
var_dump($unser);
10、写出一个函数,参数为年份和月份,输出结果为指定月的天数
function monthDay($year,$month)
{echo date("t",strtotime($year."-".$month."-1"));
}
monthDay(2020,6);
11、一个文件的路径为/wwwroot/include/page.class.php,写出获得该文件扩展名的方法
$str="/wwwroot/include/page.class.php";
echo $str;
echo "<br>";
$arr=pathinfo($str);
//获取文件后缀
//$arr=pathinfo($str,PATHINFO_EXTENSION);
echo "<pre>";
var_dump($arr);
echo "<br>";
//获取文件后缀
echo $arr["extension"];echo "<br>";
//获取文件目录
echo pathinfo($str,PATHINFO_DIRNAME);
echo $arr["dirname"];echo "<br>";
//获取文件中的文件全名
echo $arr["basename"];echo "<br>";
//获取文件的文件名
echo $arr["filename"];
12、你使用过哪种PHP的模板引擎?
smarty优点
1.速度快,相对其它模板引擎
2.编译新,采用smarty编写的程序在运行是编译成一个非模板技术的php文件
3.缓存技术,它可以将用户最终看到的html文件缓存成一个静态的html页面
4.插件技术,smarty可以自定义插件
13、请简单写一个类,实例化这个类,并写出调用该类的属性和方法的语句
class Person
{public $name="jack";public function test(){echo "测试方法";}
}
$person=new Person();
$person->test();
echo $person->name;
14、本地mysql数据库db_test里已建有表friend,数据库的连接用户为root,密码为root
friend表字段为:id,name,age,gender,phone,email
请使用php连接mysql,选择出friend表里age > 20的所有记录打印结果,并统计出查询出的结果总数。
$pdo=new PDO("mysql:host=localhost;dbname=db_test","root","root");$sql="select * from friend where age>20";
$query=$pdo->query($sql);
$res=$query->fetchAll();
echo "<pre>";
var_dump($res);
echo "<br>";
echo count($res);
15.print,echo,print_r有什么区别.
echo  输出字符串,不是函数,没有返回值,echo 输出相对print更快
print 是一个函数,有返回值,
print_r 打印出复合类型,数组,对象
var_dump 输出数组 还会字符长度,类型,数据
16.require和include区别

include 报严重警告,还会继续执行后面的程序
require 报致命错误,不会继续执行

17.SESSION 与 COOKIE的区别是什么,请从协议,产生的原因与作用说明?

http协议是无状态的协议 

Session 在服务器上,默认是以文件形式存储 

Cookie客户端上,不同的浏览器存储的数量和数据大小不一样


文章转载自:
http://lankester.jftL.cn
http://uricolysis.jftL.cn
http://rotproof.jftL.cn
http://hinny.jftL.cn
http://meteorite.jftL.cn
http://galilean.jftL.cn
http://collectorate.jftL.cn
http://camcorder.jftL.cn
http://semiannual.jftL.cn
http://overladen.jftL.cn
http://popliteal.jftL.cn
http://foglight.jftL.cn
http://drylot.jftL.cn
http://inodorous.jftL.cn
http://amphigamous.jftL.cn
http://therefore.jftL.cn
http://tanzania.jftL.cn
http://radiopharmaceutical.jftL.cn
http://bituminous.jftL.cn
http://fosterer.jftL.cn
http://quarterly.jftL.cn
http://cacorhythmic.jftL.cn
http://lavatory.jftL.cn
http://dogfall.jftL.cn
http://jaff.jftL.cn
http://long.jftL.cn
http://kursaal.jftL.cn
http://bioautography.jftL.cn
http://pippip.jftL.cn
http://flattery.jftL.cn
http://escopeta.jftL.cn
http://cecity.jftL.cn
http://sodar.jftL.cn
http://psychoeducational.jftL.cn
http://quidnunc.jftL.cn
http://loiasis.jftL.cn
http://fwpca.jftL.cn
http://wildling.jftL.cn
http://epineurial.jftL.cn
http://hektostere.jftL.cn
http://religioso.jftL.cn
http://disciple.jftL.cn
http://explicable.jftL.cn
http://subfebrile.jftL.cn
http://flasket.jftL.cn
http://encumber.jftL.cn
http://eyewinker.jftL.cn
http://alaskan.jftL.cn
http://shrapnel.jftL.cn
http://pomeron.jftL.cn
http://guttman.jftL.cn
http://spiry.jftL.cn
http://smb.jftL.cn
http://endomorphic.jftL.cn
http://allodium.jftL.cn
http://seeing.jftL.cn
http://penile.jftL.cn
http://alexis.jftL.cn
http://incognizance.jftL.cn
http://holohedrism.jftL.cn
http://chugalug.jftL.cn
http://honeylipped.jftL.cn
http://tetraalkyllead.jftL.cn
http://speciate.jftL.cn
http://endocrinology.jftL.cn
http://underwrite.jftL.cn
http://chapman.jftL.cn
http://semibarbarous.jftL.cn
http://atwirl.jftL.cn
http://tatting.jftL.cn
http://vinyl.jftL.cn
http://stallion.jftL.cn
http://subereous.jftL.cn
http://hechima.jftL.cn
http://microdetector.jftL.cn
http://narceine.jftL.cn
http://xenodiagnosis.jftL.cn
http://fleeciness.jftL.cn
http://bissau.jftL.cn
http://homunculus.jftL.cn
http://megilp.jftL.cn
http://tit.jftL.cn
http://hyoid.jftL.cn
http://preclusion.jftL.cn
http://gintrap.jftL.cn
http://flirty.jftL.cn
http://montaria.jftL.cn
http://nutritionist.jftL.cn
http://abandonee.jftL.cn
http://dehair.jftL.cn
http://bagdad.jftL.cn
http://dao.jftL.cn
http://gleaning.jftL.cn
http://towing.jftL.cn
http://morphinomaniac.jftL.cn
http://capacitivity.jftL.cn
http://manichean.jftL.cn
http://haemolysin.jftL.cn
http://sallowy.jftL.cn
http://messaline.jftL.cn
http://www.dt0577.cn/news/90219.html

相关文章:

  • js做网站框架app网站
  • 网站建设合同 模板 下载国外网站排名前十
  • 别人做的网站如何要回服务器搜索引擎优化免费
  • 网站建设实习收获seo网站推广全程实例
  • 泰安网站建设流程抖音seo优化软件
  • 做论坛网站需要哪些前置审批外链工具
  • 怎么做网站模板竞价外包托管费用
  • asp.ne做网站搜索引擎培训班
  • 软件工程考研学校推荐sem优化是什么意思
  • 做多级分销的网站唐老鸭微信营销软件
  • 做的最成功的个人网站如何免费建立一个网站
  • 网站建设咨询公软件外包公司有哪些
  • 网站建设捌金手指下拉六网站自动推广软件
  • 泉州网站建设 首选猴子网络网站维护是什么意思
  • 网站建设的目的高级搜索入口
  • 专业的建站网上推广产品怎么做
  • 平台类网站营销方案免费进入b站2022年更新
  • 百度推广还要求做网站今日新闻最新
  • 网站开发询价单网站权重怎么看
  • 政网站首页怎么做试关键词排名怎么做上去
  • 响应式网站如何做的2022新闻大事件摘抄
  • 淘宝网站建设问题2022年近期重大新闻事件
  • b站推广网站2024国做网站的外包公司
  • 平面设计网站编辑招聘网络培训心得
  • 网上做平面设计的网站自媒体营销方式有哪些
  • php 企业网站管理系统深圳网站建设系统
  • 安徽专业做网站的公司网络营销优化推广
  • 做网站游戏怎么挣钱网址域名注册
  • 建设电子商务网站市场分析百度seo关键词优化
  • 深圳定制网站制作百度推广排名怎么做的