28, May 2012

SSI include to Php include? - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: SSI include to Php include?
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: SSI include to Php include?  (Read 1369 times)
Pinoy Webmaster
.com pimp
*****
Gender: Male
Posts: 1126
6048 credits
Members referred : 0


Philippine Beaches


« on: Apr 02, 2007, 01:58:52 am »

i have this php script but to incorporate it into a webpage is thru ssi, (maybe because this script dates back to year 2005 and php is not that common, i dont know.) and the webpage needs to be in shtml format which is not possible for me because mine is in php. here is the sample ssi code it provides:

Code:
<!--#include virtual="rd1_ads.php?dir=perfume&n=50&s=da&r=n"-->

can i include this instead in php? like this:

Code:
<?php include('rd1_ads.php?dir=perfume&n=50&s=da&r=n');?>


Last blog : Bingag Beach, Bohol, Philippines
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Apr 02, 2007, 08:03:57 am »

from the PHP manual:

Code:
<?php

/* This example assumes that www.example.com is configured to parse .php
* files and not .txt files. Also, 'Works' here means that the variables
* $foo and $bar are available within the included file. */

// Won't work; file.txt wasn't handled by www.example.com as PHP
include 'http://www.example.com/file.txt?foo=1&bar=2';

// Won't work; looks for a file named 'file.php?foo=1&bar=2' on the
// local filesystem.
include 'file.php?foo=1&bar=2';

// Works.
include 'http://www.example.com/file.php?foo=1&bar=2';

$foo 1;
$bar 2;
include 
'file.txt';  // Works.
include 'file.php';  // Works.

?>


Pinoy Webmaster
.com pimp
*****
Gender: Male
Posts: 1126
6048 credits
Members referred : 0


Philippine Beaches


« Reply #2 on: Apr 02, 2007, 10:13:14 am »

oh i see... thanks.


Last blog : Bingag Beach, Bohol, Philippines
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=6328
Tags : php code Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: SSI include to Php include?
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 08:24:28 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.