fopen与Location路径问题

1,fopen正确写法:

(绝对路径)

$fp = fopen("E:\\wamp\\www\\tongjichengxu\\wangtengcong-zjz\\tc_tongji\\djdh_bd.html","w");或者

$fp = fopen("E:/wamp/www/tongjichengxu/wangtengcong-zjz/tc_tongji/djdh_bd.html","w");

(相对路径:同目录下)

$fp = fopen("djdh_bd.html","w");

2,header正确写法:

(绝对路径)

header('Location:http://localhost/tc_tongji/djdh_bd.html');

(相对路径:同目录下)

header('Location:djdh_bd.html');

你可能感兴趣的:(localhost,路径,路径问题,location,fopen)