Tamam, ben php hakkında sancı burada bir sürü () include gördük. Bu benim için çok acı bir nedeni haline görünüyor.
Sitemin yapısı bu gibi bir şeydir:
public_html\index.php
public_html\includes\content.inc.php
public_html\language\en\language.inc.php
public_html\classes\db.inc.php
Site çalışır Apache üzerinde hiçbir sorunları şişer. Bu (grr. .. # @!%) Ancak IIS üzerinde çalışmaz.
Let me explain: What is done is that index.php is always called by the webbrowser and depending on the request, it includes content.inc.php (there are many of these content files and index.php includes the appropriate one based on logic)
// -- index.php --
include(includes/content.inc.php);
Şimdiye kadar Apache ve IIS hem de iyi çalışır.
Şimdi content.inc.php da lang.inc.php ve db.inc.php içerir.
Bu gibi görünüyor:
// -- content.inc.php --
include(language/en/language.inc.php)
include(classes/db.inc.php)
Bu satırlar Apache üzerinde iyi çalışır, ancak IIS dahil edilecek dosya dosyaları olamaz yakınıyor.
Why? Because Apache maintains the current folder "." is public_html\
where the script execution first started.
IIS on the other hand changes the meaning of "." to be the file that is currently being processed. i.e after including content.inc.php, IIS interprets "." as being public_html\includes\
Şimdi ben bir çözüm, tüm bir şekilde mutlak yolları dahil değiştirmek için olduğunu biliyorum. Anladığım kadarıyla ama benim soru, bu gerçekten bir Apache / IIS sorunu olduğunu? Bu kodda mucking olmadan doğru davranmaya yapmak için bir IIS veya PHP bir ayar var mı?
BTW, php.ini vardır
include_path=".;C:\PHP\PEAR"