chrometweaks.org

Domain and iPage web hosting - best place?

Click Here To View All Answers...


My first question is Domain and iPage web hosting - best place? Thanks in advance for any response. Second question of mine... Say I was going to store a path name in a variable that is in a separate config file, then attach the config file to my main pages,.

How would I go about writing the variable in there?.

Here is an example.

That is from my config file..

Now once I include that config file to my index.php, how do I use that var?.

I was trying to use it like this.

But that wont work. how do you do it?..

Comments (12)

I'm stumped. I'm not so sure what is the right answer to your question. I'll do some investigation and get back to you if I got an anything. You should email the people at iPage as they probably could help you..

Comment #1

Everything in your above post, but I have to question the ordering.... shouldnt the type be before the src? this has me wondering if order will continue to work bass ackwards.

Just a thought.

Chris<pixlemonkey>..

Comment #2

Thanks monkey, but I didn't even realize that order made a difference, in a css link. maybe I just wrote it backwards..

Thanks for pointing that out...

Comment #3

I'm not 100% sure that it does, but some strnage things have happend on our servers in which things like this arent liked... but then again, it is kicked from time to time.

Just a side note, YES sometimes our test boxes are kicked!.

Chris<pixelmonkey>..

Comment #4

This is the error I got..

Fatal error: Failed opening required '/("/full/path/to/header.inc' (include_path='.:/php/includes:/usr/share/php') in ("/full/path/to/index.php on line 14.

Here is the code I used.

=\..

Comment #5

I belive the full/path/ refrences the location of the php program on the server... thus, it would look something like.

<?.

Require ("/development/php/scfg231.inc");.

Include ("/development/php/scfg231.inc");.

?>.

It should work the same as absolute addressing for a perl program..

Chirs<pixelmonkey>..

Comment #6

Yes you are right Chris, it is pretty much the same as absolute addresing..

Will, you will have to get the server path like the monkey showed you so you can include that file. also when you do, you only need one include or require, not both for the same file...

Comment #7

Ive tried the shortened address though and it gave me a different error.! =\.

Its almost about enough to say screw php and just go back to html...

Comment #8

I dont know what is wrong, I will post you all the code,.

This is index.php.

This is header.txt (was .inc but I changed it because it wouldnt work).

And here is the config file scfg231.inc/.txt.

Perhaps that will help?..

Comment #9

Are you sure this is the right path (new/includes/). Many servers reqire you put something like home/username/www/ or something similar. This offcurse isn't the case if you're on a dedicated server..

Good Luck,.

Paul..

Comment #10

Well ive tried it with the absolute paths and it still wouldnt work!..

Comment #11

Ok, are all the files in the ame directory? if so just do this:.

<?php.

Require ("scfg231.php");.

?>.

Noticed I changed the extension!! php will include .inc files but it likes the .php files better..

So, in the index file change it like this..

Now, you will notice a change. whenever you have a variable ($incpath) you have to be in php mode, so it has to be in-between the <? ?> tags. html doesn't know how to deal with variables like that. In my opinion I don't like going back and forth from html mode to php mode. like above, I like to stay in php mode if I start in that mode. but that is up to you..

Now you need to change header.txt to header.php and put this in it..

As far as the config file scfg231.inc/.txt, I would rename it to .php and find out your absolute path for you files. for some reason /new/img or /new/inlcude don't look right to me. they will usually look somethign like this.

/usr/www/sitename.com/html/yourdirectory.

Does that make sense??.

Oh and by the way, you don't have to put <?php, you can do it this way also <?.

But that is up to you...

Comment #12

I know my abs path I just didnt want to post it out in the open, thanks for all the help, I will try this once I get back!..

Comment #13


This question was taken from a support group/message board and re-posted here so others can learn from it.