include problem (PHP). HELP PLEASE

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Jimsies
Forum Newbie
Posts: 3
Joined: Sun Apr 20, 2003 8:31 pm

include problem (PHP). HELP PLEASE

Post by Jimsies »

Help, these are the lines that are having problems.


------

<? include('linkman.php'); ?>

*for this one, can i set a URL with it? someone please help, i need it to be specific or else on another page in a different directory, it will screw up. How do i go about making it URL specific without it screwing up? i've tried putting in the actual IP in there, and then i tried putting in the domain (http://blalhbalha.com/linkman.php) <- example. But all attempts have failed. My server allows PHP. So what's a matter? HELP PLEASE!!!
------

<? include('http://66.227.97.57/cutenews/show_news.php'); ?>

*for this one, it was working, but then it stopped working. Why woudl it stop working out of no where?

---------------------

<? include('http://66.227.97.57/ezcounter.php'); ?>

*this also was working, but then stopped working out of nowhere. Help please.

---

Any help would be greatly, greatly, greatly appreciated. Thanks!!
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

that page simply returns a number (a counter?). And only this number will be included in your script, not the source code.
Jimsies
Forum Newbie
Posts: 3
Joined: Sun Apr 20, 2003 8:31 pm

Post by Jimsies »

it is a counter. but why isn't hte page bein gloaded??

http://jbdesigns.mine.nu

like, wwhat shoudl i do with the INCLUDES up top??

is that the rihgt way to INCLUDE stuff? or do i need some other tag??

Please help.
User avatar
bender
Forum Newbie
Posts: 11
Joined: Sun Jan 12, 2003 6:53 am
Location: Sydney Australia

Post by bender »

You may need to specificy the exact file path on your server...

eg: include("/home/usr/site3/www/somedirectory/somefile.php");

Don't know if this will be the solution you're looking for, but I had a few issues with include(), and specifying files as above seemed to resolve them.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

and if you're including a file via url-wrapper (http://---) the included script is probably already parsed (just as if you opened that url in your browser).
Jimsies
Forum Newbie
Posts: 3
Joined: Sun Apr 20, 2003 8:31 pm

Post by Jimsies »

Thank you guys sooo much :D:D

it's working!!

it needed the absolute path!! thanks guys!! you guys are the best :D :D
Post Reply