![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
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? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Nov 2002
Location: Sunny California
Posts: 26,053
|
Don't ya got a book laying around on that subject guido?
__________________
icq 1904905 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 | |
So Fucking Banned
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jan 2004
Posts: 868
|
PHP Code:
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
So Fucking Banned
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
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 Code:
PHP Code:
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
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? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Join Date: Jan 2004
Posts: 868
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Join Date: Jul 2003
Location: Mobtown
Posts: 2,613
|
also remember to go with the full path ie:
PHP Code:
__________________
no sig |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Confirmed User
Join Date: Sep 2002
Posts: 106
|
Quote:
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?!? |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
Confirmed User
Join Date: Jan 2004
Posts: 868
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 | |
Confirmed User
Join Date: Sep 2002
Posts: 106
|
Quote:
__________________
Where is my sig?!? |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Join Date: Jan 2004
Posts: 868
|
also keep in mind it will disable SSI with .shtml
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 | |
Confirmed User
Join Date: Feb 2002
Location: Vegas
Posts: 5,741
|
Quote:
__________________
![]() 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! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |