473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

problem with INCLUDE

Hi!

I have a problem...

I did a PHP Script for a counter... and I want the counter to be displayed
on an another PHP page...

So, I can include it like that:

<?
include 'counter.php';
?>

BUT... and here's my problem... the script need more info... like...

<?
include 'count/counter.php?site=0001&type=2&images=1';
?>

when I try this, I get a:

Warning: Failed opening 'counter.php?site=0001&type=2&images=1' for
inclusion (include_path='.;c:\php4\pear') in D:\HTTPD\HTDOCS\count\index.php
on line 24

both files are in the same directory... can you help me???

Thanks!

Desperate Sylvain
Jul 16 '05 #1
2 2769
On Thu, 11 Sep 2003 08:37:46 -0400, Sylvain Perreault wrote:
BUT... and here's my problem... the script need more info... like...

<?
include 'count/counter.php?site=0001&type=2&images=1';
?>


You'll have to do:

<?php
$site='0001';
$type='2';
$images='1';
include 'count/counter.php';
?>

Cheers,

Andy
Jul 16 '05 #2
Sylvain Perreault writes:

BUT... and here's my problem... the script need more info... like... <?
include 'count/counter.php?site=0001&type=2&images=1';
?>


I think what you want to do here is define a function called counter
which takes the parameters. Include the function definition at the
top of the page and call it with your parameters further down.

--

__o Alex Farran
_`\<,_ Analyst / Programmer
(_)/ (_) www.alexfarran.com

Jul 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Bartosz Wegrzyn | last post by:
I need help with sessions. I createt set of web site for nav with authorization. first I go into main.php which looks like this: <?php //common functions include_once '../login/common.php';...
7
by: Forecast | last post by:
I run the following code in UNIX compiled by g++ 3.3.2 successfully. : // proj2.cc: returns a dynamic vector and prints out at main~~ : // : #include <iostream> : #include <vector> : : using...
1
by: David Li | last post by:
I am having a lot of problem with following code. To start with I have a working sets of code and the top level SystemC code looks like this: ----------working main.cpp start here...
13
by: Winbatch | last post by:
Hi, If this should be directed to another group, please let me know... I've been working with templates for a few weeks and have been able to develop some nice code on solaris using the Forte C++...
9
by: ludocluba | last post by:
Hello, here is my problem: I have 3 files: main.c toto.c toto.h: ----------------------------------------------------------- toto.h: #ifndef _toto_h #define _toto_h int var; void test(void);...
2
by: Fernando Barsoba | last post by:
Dear all, I have been posting about a problem trying to encrypt certain data using HMAC-SHA1 functions. I posted that my problem was solved, but unfortunately, I was being overly optimistic. I...
9
by: Prasad | last post by:
HI, I am a beginner in VC++.. I am trying to write a Win32 console application in visual studio.. I am using following header files.. #include <STRING> using namespace std; #include...
5
by: Tio | last post by:
I have project in MFC(vc++) . There are files and classes: classes:dialog1,dialog2,aaa,bbb ---------------------- main.cpp --------------------- #include "mainfrm.h" #include "dialog1.h"...
2
by: Dark Wind | last post by:
Hi, I have been using OPT++ to solve a non linear programming problem. I am totally new to C++, but I looked at an example given on OPT++ website and modified it according to my problem. But I...
19
by: foolsmart2005 | last post by:
I have written a snake game. There are 2 levels in the game(I finished 1st level). It can run in VC++ without problem but, when I run it on the dev C++ 4.9.9.2, it cannot run. I want to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.