![]() |
Another way to include a php file?
i have this code I need to insert into my site:
<? include "/directory/of/file/public_html/cnstats/cnt.php"; ?> but when I do insert it creates some bad mysql errors.....is there a way to include this another way other than the way I have shown above? |
include("path/to/file"); and require("path/to/file");
but it is unlikely that the way you are including has anything to do with your mysql errors.. it is more likely what is in the included file.. |
You have to look at the other file too. It seems like it is accessing a mysql database, maybe with another include that has mysql functions?
You could also try. chdir('/path/to/known/working/dir'); include('./path/to/the/file'); chdir('/current/directory/'); |
It should work, I do the same on my one site.
just put the relative (NOT absolute) path to it So if your indes is located in the root, and the cnt.php is located in the subfolder root/cnstats then it should look like this: <? include "cnstats/cnt.php"; ?> |
it has something to do with b2evolution
everything works fine, except when someone is trying to access a url_that_looks_like_this....every other thing works, and the one thing that allows those urls to work again is removing that php code from cnstats |
Quote:
|
Quote:
thanks! |
Quote:
Glad it helped. |
| All times are GMT -7. The time now is 12:17 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123