關于建立了include.php文件后反而讀不出相應文件的問題
老師我想請教下,我才看到驗證碼部分,感覺有些問題沒搞懂。我在用include文件包含后卻顯示不出相應的驗證碼圖片
,其相應代碼是這樣的
include.php:
header("content-type:text/html;charset=utf-8");
date_default_timezone_set("PRC");
session_start();
define("ROOT",dirname(__FILE__));
set_include_path(".".PATH_SEPARATOR.ROOT."/libs".PATH_SEPARATOR.ROOT."/core".PATH_SEPARATOR.ROOT."/configs".PATH_SEPARATOR.get_include_path());
require_once 'image.func.php';
getverify.php:
require_once'../include.php';
verifyImage();
但是如果我直接在getverify.php中直接用這個路徑
require_once'../libs/image.func.php';
verifyImage();
就是可以顯示的了
我想請問下這事我在include文件里哪里沒有弄對還是怎么嘛?
我相應的文件位置如下
getverify.PHP:
C:\wamp\www\shopImooc\admin
include.php
C:\wamp\www\shopImooc
謝謝老師了!
2015-01-30
看報錯信息就明白怎么回事了
^-^...
2016-12-14
我也有這個問題............................
2016-05-30
這個問題找到答案了嗎?
2015-01-29
看到之前同學的問題解決了。但是為什么session start只能開一次?!ぁぁぁぁぁ?/p>