यह समस्या अभी भीनिरपेक्ष फ़ाइल पथ
एक वीडियो पीएचपी ट्यूटोरियल मैं अनुसरण कर रहा हूं एक फ़ाइल initialize.php कहा जाता है जिसमें यह पीएचपी पूर्व-निर्धारित निरंतर Directory_Separator का उपयोग कर और फिर एक site_root को परिभाषित बनाने जा रहा है हल नहीं किया गया है। साइट_रूट PHP फ़ाइल के लिए पूर्ण फ़ाइल पथ (वेबसर्वर पथ नहीं है) को की फ़ाइलों का पता लगाने के लिए है। वह हमें निम्नलिखित कोड
defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR);
defined('SITE_ROOT') ? null :
define ('SITE_ROOT', DS.'Users'.DS.'kevin'.DS.'Sites'.DS.'photo_gallery');
मैं अपने कंप्यूटर पर फ़ाइल पथ संभालने हूँ दिया जड़/उपयोगकर्ताओं/केविन/साइटों/फोटोगैलरी है
मैं अपने कंप्यूटर पर साइट का निर्माण नहीं कर रहा हूँ, बल्कि सीधे ऑनलाइन । मुझे नहीं पता कि इसके बजाय डालने के लिए फ़ाइल पथ क्या है।
जैसा कि उन्होंने जोर दिया कि यह वेबसर्वर पथ नहीं है, बल्कि फाइल सिस्टम पथ है, मैं इसके बजाय क्या रखूं। बस इस तरह का डोमेन नाम।
define('SITE_ROOT', DS. 'www.example.com');
वह वेबसर्वर पथ नहीं चाहता है लेकिन फाइलें ऑनलाइन स्थित हैं? तो मुझे यह नहीं मिला।
अद्यतन
वीडियो ट्यूटोरियल निम्नलिखित कोड
defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR);
defined('SITE_ROOT') ? null :
define ('SITE_ROOT', DS.'Users'.DS.'kevin'.DS.'Sites'.DS.'photo_gallery');
defined('LIB_PATH') ? null : define('LIB_PATH',SITE_ROOT.DS.'includes');
मैं इस कोड का इस्तेमाल किया प्रयोग किया है:
defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR);
defined('SITE_ROOT')? null: define('SITE_ROOT', realpath(dirname(__FILE__)));
defined('LIB_PATH') ? null : define('LIB_PATH',SITE_ROOT.DS.'includes');
मैं इस त्रुटि संदेश मिला
require_once(/hsphere/local/home/c263430/quoralist.com/includes/includes/config.php): failed to open stream: No such file or directory in /hsphere/local/home/c263430/quoralist.com/includes/initialize.php on line 11 Fatal error: require_once(): Failed opening required '/hsphere/local/home/c263430/quoralist.com/includes/includes/config.php' (include_path='.:/hsphere/shared/apache/libexec/php5ext/php/') in /hsphere/local/home/c263430/quoralist.com/includes/initialize.php on line 11
अद्यतन experimentX से नीचे 3 संपादन का उपयोग कर, और साथ ही निम्न
define('SITE_ROOT', DS.'hsphere'.DS.'local'.DS.'home'.DS.'c263430'.DS.'quoralist.com');
मैं हमेशा त्रुटि संदेश
Warning: require_once(LIB_PATH/config.php): failed to open stream: No such file or directory in /hsphere/local/home/c263430/quoralist.com/includes/initialize.php on line 11 Fatal error: require_once(): Failed opening required 'LIB_PATH/config.php' (include_path='.:/hsphere/shared/apache/libexec/php5ext/php/') in /hsphere/local/home/c263430/quoralist.com/includes/initialize.php on line 11
इसके अलावा,
वीडियो के लिंक = हे – Joseadrian
जोड़े यह ऑनलाइन, खेद – Leahcim
Micahel मैं जवाब –