Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-30-2004, 05:37 PM   #1
Juicy D. Links
So Fucking Banned
 
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
Yo how do I do a php include thingy?

Whats the code for this?

to include a snippet of juicy shit on evry page?
Juicy D. Links is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-30-2004, 05:38 PM   #2
Ice
Confirmed User
 
Ice's Avatar
 
Join Date: Nov 2002
Location: Sunny California
Posts: 26,053
Don't ya got a book laying around on that subject guido?
__________________
icq 1904905
Ice is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-30-2004, 05:39 PM   #3
Juicy D. Links
So Fucking Banned
 
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
Quote:
Originally posted by iceicebaby
Don't ya got a book laying around on that subject guido?
yeah but i dont read any of them they are too thick and technical for me
Juicy D. Links is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-30-2004, 05:40 PM   #4
lurking
Confirmed User
 
Join Date: Jan 2004
Posts: 868
PHP Code:
include("file.php"); 
lurking is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-30-2004, 05:40 PM   #5
Juicy D. Links
So Fucking Banned
 
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
Quote:
Originally posted by lurking
PHP Code:
include("file.php"); 
thanks
Juicy D. Links is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-30-2004, 05:42 PM   #6
fusionx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Olongapo City, Philippines
Posts: 4,618
here's the real deal: http://us4.php.net/include/

and here's the quickie:

PHP Code:
<?php include 'http://www.example.com/file.php?foo=1&bar=2'?>
or

PHP Code:
<?php include 'file.php?foo=1&bar=2'?>
or

PHP Code:
<?php include '/sub/file.php?foo=1&bar=2'?>
fusionx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-30-2004, 05:42 PM   #7
Juicy D. Links
So Fucking Banned
 
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
edit


can you use these on .shtml pages?

Last edited by juicylinks; 04-30-2004 at 05:43 PM..
Juicy D. Links is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-30-2004, 05:50 PM   #8
lurking
Confirmed User
 
Join Date: Jan 2004
Posts: 868
Quote:
Originally posted by juicylinks
edit


can you use these on .shtml pages?
no, that is SSI.
lurking is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-30-2004, 05:53 PM   #9
dirtysouth
Confirmed User
 
Join Date: Jul 2003
Location: Mobtown
Posts: 2,613
also remember to go with the full path ie:
PHP Code:
<?php include('/home/sites/juicylinks.com/html/juicy.php'); ?>
*edit* as opposed to a url.
__________________
no sig

Last edited by dirtysouth; 04-30-2004 at 05:54 PM..
dirtysouth is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-30-2004, 05:55 PM   #10
WallaceW
Confirmed User
 
Join Date: Sep 2002
Posts: 106
Quote:
Originally posted by juicylinks
edit


can you use these on .shtml pages?
Yes, but not by default.

There are several ways to do that, but my fav is to make an .htaccess file in the directory where you want your .shtml pages with executable php. In that .htaccess put this:

AddType application/x-httpd-php .php .shtml

From then your .shtml will be treated as PHP also...

Regards
__________________
Where is my sig?!?
WallaceW is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-30-2004, 05:59 PM   #11
lurking
Confirmed User
 
Join Date: Jan 2004
Posts: 868
Quote:
Originally posted by WallaceW
Yes, but not by default.

There are several ways to do that, but my fav is to make an .htaccess file in the directory where you want your .shtml pages with executable php. In that .htaccess put this:

AddType application/x-httpd-php .php .shtml

From then your .shtml will be treated as PHP also...

Regards
keep in mind if the page has a lot of traffic this will put a huge load on the server. it is much wiser to use .php or .phtml
lurking is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-30-2004, 06:02 PM   #12
WallaceW
Confirmed User
 
Join Date: Sep 2002
Posts: 106
Quote:
Originally posted by lurking
keep in mind if the page has a lot of traffic this will put a huge load on the server. it is much wiser to use .php or .phtml
Sure. It's just the way if you MUST run php in other then .php files.
__________________
Where is my sig?!?
WallaceW is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-30-2004, 06:05 PM   #13
lurking
Confirmed User
 
Join Date: Jan 2004
Posts: 868
also keep in mind it will disable SSI with .shtml
lurking is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-30-2004, 06:41 PM   #14
tgp-guru
Registered User
 
Join Date: Feb 2004
Location: NYC and DC Metro
Posts: 64
Use require() instead of include(). If the file to be included is not found require() dies whereas include() gives just an error message. Also with older versions of php (< 4 i think) require would always assume to include the file on compilation whereas include would be subject to runtime conditionals.
__________________
AIM: johnny b dollars
ICQ: 211895983
tgp-guru is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-30-2004, 06:43 PM   #15
High Quality
Confirmed User
 
Join Date: Feb 2002
Location: Vegas
Posts: 5,741
Quote:
Originally posted by tgp-guru
Use require() instead of include(). If the file to be included is not found require() dies whereas include() gives just an error message. Also with older versions of php (< 4 i think) require would always assume to include the file on compilation whereas include would be subject to runtime conditionals.
Good point... don't want them surfers knowing you fucked up.
__________________

RecurCash.com - Averaging $38/sale with 60% revshare in the first 4 months alone!

Convert your TEEN traffic today @ better than 1:500 guaranteed. ICQ me: 18287590!
High Quality is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.