登陆

我的为什么用www.myphp无法打开

<?php
header('content-type:text/html;charset=utf-8');
//用户输入一个数字,是奇数还是偶数
//判断用户输入的数字是否是闰年
//用户输入3个数字,输出其最大值

$number=$_POST['number'];
// echo $number;
// if($number%2==1){
//   echo $number,'是基数<br/>';
// }
//
// if($number%2==0){
//   echo $number,'是偶数<br/>';
// }
if($number%2==0){
 echo $number.'是偶数<br/>';
}else{
 echo $number.'是奇数<br/>';
}

# PHP
A-庆装饰设计A-庆装饰设计1372 天前726 次浏览

全部回复(4)我要回复

  • heloo

    heloo2018-02-12 22:20:56

    host 里

    127.0.0.1 www.myphp.com

    回复
    0
  • A-庆装饰设计

    绑定了,还有哪需要

    A-庆装饰设计 · 2018-02-13 08:20:41
    heloo

    不知道你用的开发工具,举个例子吧修改比如Apache里的httpd-vhost.conf 里的代码,例如我是放在了www目录下的thinkphp目录 # <VirtualHost *:80> ServerName test.com ServerAlias test.com DocumentRoot e:/wamp/www/thinkphp/public <Directory "e:/wamp/www/thinkphp/public/"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require local </Directory> </VirtualHost> #

    heloo · 2018-02-13 19:51:23
  • 韦小宝

    韦小宝2018-02-12 09:23:35

    hosts里绑定了嘛

    回复
    0
  • A-庆装饰设计

    怎么绑定?

    A-庆装饰设计 · 2018-02-12 10:49:20
    A-庆装饰设计

    PHPstudy

    A-庆装饰设计 · 2018-02-13 08:20:00
    韦小宝

    你是用的PHPstudy还是PHP工具箱

    韦小宝 · 2018-02-12 10:50:08
  • 取消回复发送