Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

PHP Question / Help

New Here ,
Nov 13, 2010 Nov 13, 2010

Copy link to clipboard

Copied

I am trying to use a news script using the include function using the instuctions below:

2) Using PHP include() - you can use a PHP include() in any of your PHP pages. Edit your .php page and put the code below where you want the news to be.
<?php include("D:\Hosting\6387712\html\newsscript\installation.phpnews.php"); ?>


But when I do I get the following errors as seen on http://www.abbeyplace.ca

Warning: include(D:\Hosting387712\html ewsscript\installation.phpnews.php) [function.include]: failed to open stream: No such file or directory in D:\Hosting\6387712\html\index.php on line 200


Warning: include() [function.include]: Failed opening 'D:\Hosting387712\html ewsscript\installation.phpnews.php' for inclusion (include_path='.;C:\php5\pear') in D:\Hosting\6387712\html\index.php on line 200

I am truely a noob when it comes to this, so I am sorry if this is a silly question.

Paul

TOPICS
Server side applications

Views

498
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 13, 2010 Nov 13, 2010

Copy link to clipboard

Copied

NVM got it working, thanks.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 14, 2010 Nov 14, 2010

Copy link to clipboard

Copied

LATEST

It looks like a path problem, you are not pointing to the correct location of your include file. Many people will create an includes folder, just like an image folder, to keep all of their include files.  This folder sits in the root directory. So when you call and include, lets call it sample.php, it would look like this:

<?php include ('includes/sample.php');?>

Also, it is a common practice when you create an include file to name it as such: sample.inc.php

HTH

Gary

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines