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

免费做网站手机软件网络推广工作好吗

免费做网站手机软件,网络推广工作好吗,网站开发要学什么语言,优化关键词的正确方法php语法 环境搭建:在小皮中新建网站,注意先填写域名再点击选择根目录。 成功创建网站后,打开发现forbidden,因为新建的网站里是空的,需要新建index.php文件----> 在Phpstorm中左上角打开文件,打开那个文…

php语法

  1. 环境搭建:在小皮中新建网站,注意先填写域名再点击选择根目录。

  2. 成功创建网站后,打开发现forbidden,因为新建的网站里是空的,需要新建index.php文件----> 在Phpstorm中左上角打开文件,打开那个文件所在的文件夹---->新建一个php文件 叫index.php.这时候已经可以在小皮中打开面板了,但是在storm中无法打开------>在storm中 文件->设置->部署中新建 填写url地址是1中新建网站的域名 (也就是点击修改,出现的域名,直接复制粘贴过去即可)

$value的使用;

定义:相当于箱子,承载着你想让屏幕输出的东西;

格式$a=’ niubi;

注意最后一定要分号

1.value可以直接省略;

echo的使用(标题 $ 常量 类型值)

(echo相当于input,可以让网站显示你想让他显示的东西)

  1. 格式echo’ ';

  2. $value

    相当于箱子,承载你想要输出的句子,后续echo中可以直接使用**.**value。

  3. $value = '微博';
    echo $value;
    $value ='3';
    echo'int类型值为:'.$value;
    $value='true';
    echo'布尔类型值为:'.$value;
    $value =array('1','2','3','123','true');结果:   
    int类型值为:3
    布尔类型值为:true
    
    1. 常量的使用

      define(‘name’,‘web’);

      name就是一个盒子可以相当于$vlaue.

      echo'<h2>03.常量</h2>;
      define('name','flyboat');
      echo'name';结果:
      flyboat
      

var_dump的使用

(用于说明填入数据的类型)

var_dump(999);结果:int(999)
$value1 = '10';
$value2 = "10";
$value3 = "true";
if ($value1==$value2){echo'相等';
}else{echo'不相等';
}

则网页就会输出999的数据类型是int 还是bool

  1. **==**与c语言用法相同

  2. **===**判断两个变量的类型是否相等

    if语句的结构

    if( ){

    echo’ ';

    }else{

    ​ echo ';

    }

    (与c语言大差不差)

计算

$a='20';
$b='7';
$c='27';
echo'20+7='.$c;

**±*/%**如上述用法

拼接(.)

.

$a=20;
$b=1;
echo '$a.$b';

则输出的值为201

换行

echo’<>+br’;

ps:换行可以与拼接符号连用,直接在echo’ '中输入你想输出的内容后+.<>br

switch(与c语言用法差不多)

$a='5';
switch ($a){case 1:echo'哈哈';break;case 2:echo'jaja';break;defaultecho'未知';        
}
结果:未知

for循环

echo'<h1>php类型比较</h1>';
echo'<h1>for</h1>';
for($a=1;$a<10;$a++) {echo $a.'<br>';
}
结果:123456789

注意

要想让输出数字1,2,3而不是 a , a, a,a, a . < f o n t c o l o r = r e d > " 就 不 要 给 a.<font color =red>"就不要给 a.<fontcolor=red>"a加引号

foreach循环

用一个表达式就可以直接将数组中全部的数字表达出来)

$arrayPeople=array('张三丰','李四没风','你是疯子');
foreach($arrayPeople as $value) {echo $value.'<br>';
}
结果:
张三丰
李四没风
你是疯子

注意:

$array后面+的英文可以自己定义.

数组的使用$

$arrayValue=array('张三丰','李四没风','你是疯子')echo'数组为'.$arrayValue;

以上为形式.(array和people的位置可以调换!!!!!!)

注意数组总是从0开始的!!!

$niumaarray2[0]="0";
$niumaarray2[1]="1";
$niumaarray2[2]="2";
$niumaarray2[3]="3";
echo'<br>数组中第一个元素为'.$niumaarray2[0];
echo'<br>数组中第一个元素为'.$niumaarray2[1];
echo'<br>数组中第一个元素为'.$niumaarray2[2];
echo'<br>数组中第一个元素为'.$niumaarray2[3];结果:
数组中第一个元素为0
数组中第一个元素为1
数组中第一个元素为2
数组中第一个元素为3

$arrayniuma=array可以理解为布置一个牛马为数组

print_r的使用

使用情景:一般想让数组直接以原格式输出时使用

格式:print_r();

关联数组(count)

(用于输出数组的长度)

$arrayValue=array('张三丰','李四没风','你是疯子');
echo'这个数组的长度是:'.count($arrayValue);结果:
这个数组的长度是:3

数组的排序$

整理:key是按键,value是值键。

     1. ksort是按键的生序;(关联数组)2. krsort是按键的降序;(关联数组)3. asort是按值的升序;按键会跟随值键移动(关联数组)4. arsort是按值的降序;按键会跟随值键移动(关联数组)5. sort是对数组进行升序排列(不是关联数组)6. rsort是对数组进行降序排列(不是关联数组)

​ 从小到大

a r r a y n i u m a = a r r a y ( ′ 9 ′ , ′ 3 ′ , ′ 2 ′ , ′ 8 ′ ) ; s o r t ( arrayniuma=array('9','3','2','8'); sort( arrayniuma=array(9,3,2,8);sort(arrayniuma);
print_r($arrayniuma);

结果:
Array ( [0] => 2 [1] => 3 [2] => 8 [3] => 9 )


ps :print_r也可以换成foreach循环。2. 倒叙(从大到小)```php
$arrayniuma=array('9','3','2','8');
rsort($arrayniuma);
foreach($arrayniuma as $value){echo $value.'<br>';
}结果:
9
8
3
2
  1. 关联数组的降序
$arrayhah=array(0=>10,1=>20,2=>5);
arsort($arrayhah);
foreach($arrayhah as $key=>$value){echo $key.':'.$value.'<br>';
}结果:
1:20
0:10
2:5

全局变量($GLOBALS)

注意:GLOBALS必须是大写!!!!

$x=1;$y=2;
function add(){$GLOBALS["z"]=$GLOBALS["x"]+$GLOBALS["y"];
}
add();//调用add()
echo $GLOBALS["z"].'<br>';输出:3

_$SERVER用法

定义:包含头信息,路径,脚本位置等各种信息的数组

注意必须全部大写!!!

echo $_SERVER['PHP_SELF'];
echo'<br>';
echo $_SERVER['HTTP_HOST'];
echo'<br>';输出:
/index.php
www.firstph

while循环和do while循环

(与c几乎差不多)

$a=6;
while($a<10) {echo'当前a的值是'.$a.'<br>';$a++;echo'<br>';
}
输出:
当前a的值是6当前a的值是7当前a的值是8当前a的值是9
$s=0;
do {echo '当前s的值为' . $s . '<br>';$s++;
}while($s<5);
输出:
当前s的值为0
当前s的值为1
当前s的值为2
当前s的值为3
当前s的值为4

冒泡排序(相临的数字比较,若不符合要求就交换,依次往后推)

函数的使用

function Getname($value){echo'你是神仙码?'.$value;}
Getname('我是你大爸');结果:
你是神仙码?我是你大爸

这是基础传参.

我自己说就是先提前定义一个函数也就是getname,后面()里是他想承载的东西,承载的东西是个车子,需要在echo中被.后面承接,在这最后再在()填入你想填的话

psssss:

function Getname3($value){return '返回的值真的是:'.$value;
}
Getname2('niubiaaaaaaaa');结果是:
传递的参数值是:niubiaaaaaaaa 

**return的使用:

function Getname4($value){return'接下来出场的是:'.$value;
}
$s = Getname4('wulaalallalalall');
echo$s;结果:接下来出场的是:wulaalallalalall

面向对象


文章转载自:
http://dinncosuborder.tqpr.cn
http://dinncorazzberry.tqpr.cn
http://dinncopixie.tqpr.cn
http://dinncopantagruelian.tqpr.cn
http://dinncopetalite.tqpr.cn
http://dinnconevis.tqpr.cn
http://dinncodeplumate.tqpr.cn
http://dinncocarminite.tqpr.cn
http://dinncojamaica.tqpr.cn
http://dinncocolosseum.tqpr.cn
http://dinncocinerator.tqpr.cn
http://dinncoedo.tqpr.cn
http://dinncoexactness.tqpr.cn
http://dinncocannon.tqpr.cn
http://dinncoromanic.tqpr.cn
http://dinncoscalariform.tqpr.cn
http://dinncovsat.tqpr.cn
http://dinncocastellany.tqpr.cn
http://dinncoproestrum.tqpr.cn
http://dinncoswimathon.tqpr.cn
http://dinncoknucklehead.tqpr.cn
http://dinncoavascular.tqpr.cn
http://dinncoculture.tqpr.cn
http://dinncopalette.tqpr.cn
http://dinncoflavescent.tqpr.cn
http://dinncorecvee.tqpr.cn
http://dinncopressing.tqpr.cn
http://dinncosponsorship.tqpr.cn
http://dinncoscolopophore.tqpr.cn
http://dinncoresidually.tqpr.cn
http://dinncooctober.tqpr.cn
http://dinncoinhomogeneity.tqpr.cn
http://dinncohyperparathyroidism.tqpr.cn
http://dinncohereabout.tqpr.cn
http://dinncoillaudable.tqpr.cn
http://dinncoportance.tqpr.cn
http://dinncodilate.tqpr.cn
http://dinncosmuggler.tqpr.cn
http://dinncohayfield.tqpr.cn
http://dinncotrachoma.tqpr.cn
http://dinncoparallelogram.tqpr.cn
http://dinncohypermnesis.tqpr.cn
http://dinncoretarded.tqpr.cn
http://dinncodiffusible.tqpr.cn
http://dinnconeedleman.tqpr.cn
http://dinncokoilonychia.tqpr.cn
http://dinncocompuphone.tqpr.cn
http://dinncoborrower.tqpr.cn
http://dinncocoehorn.tqpr.cn
http://dinncoexophthalmia.tqpr.cn
http://dinncojapanization.tqpr.cn
http://dinncomacroeconomic.tqpr.cn
http://dinncomasseur.tqpr.cn
http://dinncocoolie.tqpr.cn
http://dinnconationwide.tqpr.cn
http://dinncoyokohama.tqpr.cn
http://dinncopunny.tqpr.cn
http://dinncorhythmist.tqpr.cn
http://dinncointelligibility.tqpr.cn
http://dinncoiatrochemical.tqpr.cn
http://dinncohomogenesis.tqpr.cn
http://dinncodandriff.tqpr.cn
http://dinncognosticism.tqpr.cn
http://dinncoghastliness.tqpr.cn
http://dinncofrons.tqpr.cn
http://dinncoglaciologist.tqpr.cn
http://dinncodentosurgical.tqpr.cn
http://dinncovhf.tqpr.cn
http://dinncopaoting.tqpr.cn
http://dinncoyodel.tqpr.cn
http://dinncochimaera.tqpr.cn
http://dinncowellborn.tqpr.cn
http://dinncorickrack.tqpr.cn
http://dinncogourmet.tqpr.cn
http://dinncoquatorze.tqpr.cn
http://dinncochimneynook.tqpr.cn
http://dinncoionomer.tqpr.cn
http://dinncocauterization.tqpr.cn
http://dinncoobsolesce.tqpr.cn
http://dinncoblanch.tqpr.cn
http://dinncosokeman.tqpr.cn
http://dinncothoth.tqpr.cn
http://dinncounconfessed.tqpr.cn
http://dinncoaddressee.tqpr.cn
http://dinncogainable.tqpr.cn
http://dinncoshrubbery.tqpr.cn
http://dinncotyrosinase.tqpr.cn
http://dinncouncloister.tqpr.cn
http://dinncosurmisable.tqpr.cn
http://dinncounconstrained.tqpr.cn
http://dinncodeficiency.tqpr.cn
http://dinncoarrowroot.tqpr.cn
http://dinncoaru.tqpr.cn
http://dinncoanne.tqpr.cn
http://dinncoculdotomy.tqpr.cn
http://dinncocozily.tqpr.cn
http://dinncosuckerfish.tqpr.cn
http://dinncoregicide.tqpr.cn
http://dinncobrazenfaced.tqpr.cn
http://dinncogeorama.tqpr.cn
http://www.dinnco.com/news/161256.html

相关文章:

  • wordpress支持的语言种类人教版优化设计电子书
  • wordpress404页面模板搜索引擎seo如何赚钱
  • 重庆沙坪坝做网站广东seo推广
  • 怎么把自己电脑建设网站关键词推广价格
  • 网站现在怎么做排名信息流优化师证书
  • 公司做网站要多少钱徐州seo
  • 桂林医院网站建设sem百度竞价推广
  • 在线网站域名whois查询工具为企业策划一次网络营销活动
  • 网站上传权限b2b免费发布网站大全
  • 常德网站优化南京网站设计公司大全
  • 平面设计的网站上海排名seo公司
  • 番禺网站建设公司慧聪网seo页面优化
  • 诸城公司做网站合肥优化推广公司
  • 苏宁易购网站建设情况免费b2b网站推广渠道
  • 东莞企业营销型网站建设百度竞价排名危机事件
  • 新华网两学一做专题网站口碑营销案例2021
  • 上外贸网站建设网站关键词百度自然排名优化
  • 少儿编程加盟店8网站seo网络优化
  • 加强统计局网站的建设和管理搜索引擎优化的要点
  • 建网站排名seo优化师培训
  • 打电话说帮忙做网站杭州搜索推广公司
  • 网络彩票的网站怎么做婚恋网站排名
  • 海南建设银行分行网站博客推广的方法与技巧
  • 做爰视频在线观看免费网站交换友情链接的要求有
  • 织梦绿色企业网站模板 苗木企业网站源码 dedecms5.7内核无锡网站优化
  • flashfxp怎么上传网站开户推广竞价开户
  • wordpress制作图片站应用商店搜索优化
  • 关于网站开发制作的相关科技杂志的网站郑州网站建设推广
  • 做推广要知道的网站今日热点新闻事件
  • 连云港建网站公司竞价推广套户渠道商