473,671 Members | 2,340 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Include Is Not Working

28 New Member
I am using an include file in my php program. This include file is not working with php program file ,but it is working with browser(http://yoga.womans-health.net/Includes/NewsFeed.php?CA T=About+Yoga). Code is given below
Expand|Select|Wrap|Line Numbers
  1. include  'http://yoga.womans-halth.net/Includes/NewsFeed.php?CAT=About+Yoga';
  2.  
your help is greatly appreciated.. thanks
Feb 2 '08 #1
3 1328
jenkinsloveschicken
56 New Member
benoypaul,

Have you tried referencing the working directory/relative path? ie.

Expand|Select|Wrap|Line Numbers
  1.  
  2. include('Includes/NewsFeed.php')
  3.  
  4.  
Also, check out php.net. Search for include and check out the documentation. There are many different ways of approaching this type of problem.

Post back if you are still having problems.

Regards,
Jenkins
Feb 2 '08 #2
Markus
6,050 Recognized Expert Expert
It's searching for a file named: NewsFeed.php?CA T=About+Yoga

and that probably isnt how the file is named. I suspect it is: NewsFeed.php

I'm not sure if there's a way to add variables to the end of an included file name.
Feb 3 '08 #3
ifedi
60 New Member
It's searching for a file named: NewsFeed.php?CA T=About+Yoga

and that probably isnt how the file is named. I suspect it is: NewsFeed.php

I'm not sure if there's a way to add variables to the end of an included file name.
Yeah, of course.
The query string (ie the '?' and all that comes after it is probably the offender. Donno what its doin in an include statement.

Ifedi.
Feb 8 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

11
2988
by: Yannick Turgeon | last post by:
Oups! I did a typing error in my last post. Fixed. ----------- Hello all, We are currently changing our web server and, in the process, updating PHP version from 4.3.0 to 4.3.5. The problem we've got is that our way to include some files in other ones is no more working properly. The message we are getting looks like: "PHP Warning: main(..\db.inc.php): failed to open stream: No such file or directory in ..."
2
1948
by: Mike | last post by:
I don't completely understand the documentation for the include() function: "Files for including are first looked in include_path relative to the current working directory and then in include_path relative to the directory of current script. E.g. if your include_path is ., current working directory is /www/, you included include/a.php and there is include "b.php" in that file, b.php is first looked in /www/ and then in /www/include/. " ...
5
6090
by: Danny Anderson | last post by:
Hola! I am working on a program where I am including a library that came with my numerical methods textbook. The "util.h" simply includes a large number of files. I had to change the util.h slightly to adjust path names and also take into account I am working with a case-sensitive OS. My program is below. The sticky point is that adding (#include "util.h") seems to negate the (#include <string>) statement somehow. How can I get...
5
2506
by: David Mathog | last post by:
One thing that can make porting C code from one platform to another miserable is #include. In particular, the need to either place the path to an included file within the #include statement or to very carefully define the order in which paths are searched with command line options on the compiler. Both can cause problems, especially when dealing with complex software distributions. It occurs ot me that by extending the C include...
2
4633
by: WisTex | last post by:
I've come across a very weird problem. Virtual includes work on all my ASP pages on the entire website, including those in subdirectories, yet they won't work on a particular page I created, even though the virtual include statement is copy & pasted exactly as it appears on the working pages. What would cause virtual includes to work in one page on a website, but not on another? Error Message: Microsoft VBScript runtime error...
6
2782
by: +86 | last post by:
i encountered this problem: "include('inc.php')" will work problely but "include('./inc.php') doesn't work .. both file_exists('inc.php') or file_exists('./inc.php') didn't return the right value.this always show "file doesn't exists' my environment is win2003+iis+php5 how to fix it ?
8
2136
by: The Cool Giraffe | last post by:
One thing i do know for sure. When one creates a CPP file, one needs to include the H file. Now, having said that, i wonder if there are some general hints, requirements or standard guide lines on what and how to include. Suppose that we have a project consisting of a number of classes and structs. Some of them using the others, some using all of them. What is a good approach when including? --
11
26601
by: cybervigilante | last post by:
I can't seem to change the include path on my local winmachine no matter what I do. It comes up as includ_path .;C:\php5\pear in phpinfo() but there is no such file. I installed the WAMP package and PEAR is in c:\wamp\php\pear I modified php.ini in the c:\wamp\php directory to reflect the actual path, but even stopping and restarting my server shows the c: \php5\pear path. I can't change it no matter what I do I also tried the...
10
1943
by: Raheem | last post by:
Hello, I built a development version of a live website on my hosted account. However the development version is having problems with finding include files. After troubleshooting I was able to resolve the issue by removing the ../ from the beginning of the include file path. But now I am looking at making this modification hundreds of times in all kinds of files. I'd like to keep the dev env similar to the live env so I can port changes...
0
8473
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8390
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8911
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8819
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8597
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6222
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5692
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4402
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.