İç içe php dahil

0 Cevap php

Dizin yapısı:

  • C :/ wamp / www / uygulama / model / data_access / data_object.php

  • C :/ wamp / www / uygulama / model / users / user.class.php

  • C :/ wamp / www / uygulama / denetleyici / projects.php

  • C :/ wamp / www / uygulama / denetleyici / links / links.php

Ben 2 php dosyaları data_object.php ve user.class.php Şimdi user.class.php data_object.php wchih için bir include deyimi vardır iki dosya farklı bir dizin hiyerarşisi altında user.class.php.These göredir. I User () nesne oluşturmak istediğinizde Şimdi ben (kendilerini farklı hiyerarşi altında links.php-ki projects.php gibi) çeşitli dosyaları bu user.class.php içermek zorunda.

Sorun data_object.php dosya dahil diyelim projects.php için çalışır ama links.php açarsanız hata mesajı o user.class.php açık dosya data_object.php yapamadım diyor için göreli bir yoldur. Ne ben düşünüyorum user.class.php dahil edildiği dosyanın yolunu düşünüyor data_object.php göreli dahil değildir. Birden fazla senaryolarda bu tür sorunlarla karşı karşıya am

I have to keep my directory structure the way it is but have to find a way to work with nested includes. I used Document root of session it give root path as C:/wamp/www/ i appended the path for data_object.php include but this is not working. (note: the forward slash is present after www) I am currently running on wamp server's localhost but after completion i have to host the solution on a domain. Pls help

0 Cevap