Jump to content

include path issue


prabir

Recommended Posts

Hello Everyone, i am fairly new in PHP coding, and facing some issue with include function in php. my problem is as follows:

 

in a php script which is located at "/include/cart.php" i am including a html page "cart_add.html" which is at location "/cart_add.html"

 

now whenever i am clicking on any links on this page "cart_add.html" browser looking for all other pages at location "/include/" instead of "/"

 

so in the browser i see url as "http://localhost/include/index.html"  instead of

 

"http://localhost/index.html"

 

so i get error like this :

 

[an error occurred while processing this directive] The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated.

 

Please help me to resolve this issue. Thanks very much

Link to comment
https://forums.phpfreaks.com/topic/215309-include-path-issue/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.