SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    Addicted to the Source of Life PowerBit's Avatar
    Join Date
    Feb 2004
    Location
    Loveland Co
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question questions on writing a correct path for files

    Hi there,

    I have designed a site that uses php includes for the navigation and other details on top of having a style sheet. I am doing SEO and want a subdirectory that I can write specific SEO for city specific searches. I am trying to come up with an easy way to access the rest of my site from these subdirectory pages and access my style sheet and menu so I can create navigation out of this sub directory to the rest of my site.

    I have figured out that I will need to create another menu for my php include that has the navigation written to go back out of this sub directory. I have written the following code:

    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <!-- Affordable custom website design company with great service and affordable prices -->
    <html>
    <head>
    <title>Looking for professional logo designers in Fort Collins? Try Ampelos Logo Design - Creative and Affordable Logo Portfolio.</title>
    <meta name="keywords" content="logo design, logo designer, logo design company, logo artist, logo design artist, logo designers, logos, logo branding, branding, marketing, graphic designer, graphic designers, Loveland logo design company, Wyoming logo design company, Fort Collins logo design company, Denver logo design company, Denver logo artists, Fort Collins logo artists, Loveland logo artists, Wyoming logo artists,  professional logo design company, affordable logo design company, creative logo design company, creative logo design portfolios, professional logo design portfolios">
    <meta name="description" content="Affordable logo design company with great service and affordable prices. We work for you!">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link rel="stylesheet" type="text/css" href="http://localhost/powerbit/includes/browser_controls.css">
    <!--[if lt IE 7]>
    <style type="text/css">
    body {behavior: url(includes/whateverhover.htc);}
    </style>
    <![endif]--> 
    
    </head>
    
    <body id="branding">
    <div id="wrapper">
      
      <div id="header"> 
        <h1><a href="http://localhost/powerbit/index.php" title="Ampelos - Your affordable logo design center">Powerbit<span>&nbsp;</span></a></h1>
      </div>
    
    <div id="nav_container"> 
    <?php include("http://localhost/powerbit/includes/menu_php.php") ?>
    </div>
    
    <div id="upper_transition"></div>
    <div id="screen">
    
    <div class="col_full_no_pad">
    <div class="col_twothird">
    <h2>Ampelos - Bold New Logo Design Services</h2>
    <p>We forge dynamic, new expressions of your true nature with our creative logo design. We set the stage to communicate your character and the fruit of your work to those to whom you want to reach.</p>
     <div class="expanded_navlist">
     <ul>
     <h3 class="smaller">Brand your enterprise right!</h3>
      <li class="top"><a href="logo_design_portfolio.php" title="our logo design portfolio">Check out our logo design portfolio!</a></li>
      <li><a href="web_design.php" title="web design services">Websites that further your brand!</a></li>
      <li><a href="website_optimization.php" title="our clients">Market your self with expert SEO Marketing!</a></li>
    
     </ul>
     </div>
    
    </div>
    <div id="rhimgblock"></div>
    </div>
    </div>
    <div id="lower_transition"></div>
    <!--<div id="lower_page"></div>-->
    <div id="footer"></div>
    <div class="rights"><?php include("http://localhost/includes/copyright.php") ?></div>
    
    </div>
    </body>
    </html>
    I am basically wanting to be able to have pages that people land on from the net that can access the rest of the site through a similar menu catered to paths written to navigation out of the sub directory. Given the above code I get the following message over the top of my layout... If you need additional details please don't hesitate to ask.

    Warning: include(http://localhost/powerbit/includes/menu_php.php) [function.include]: failed to open stream: no suitable wrapper could be found in C:\xampp\htdocs\powerbit\logo_design_company\colorado\fortcollins_logo_design.php on line 26

    Warning: include() [function.include]: Failed opening 'http://localhost/powerbit/includes/menu_php.php' for inclusion (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\powerbit\logo_design_company\colorado\fortcollins_logo_design.php on line 26

  2. #2
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    you need to set allow_url_fopen to On in php.ini.

    Question: Why don't you use absolute urls with the navigation?
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  3. #3
    Addicted to the Source of Life PowerBit's Avatar
    Join Date
    Feb 2004
    Location
    Loveland Co
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb Thanks

    Quote Originally Posted by arkinstall View Post
    you need to set allow_url_fopen to On in php.ini.
    How do that young wiz?

    Quote Originally Posted by arkinstall View Post
    Question: Why don't you use absolute urls with the navigation?
    By using a menu that I include I avoid the hassle of changing numerous pages when I change the navigation around. Hey thanks for your help!

  4. #4
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    To find PHP.ini, you create a php file and in it, just put:
    PHP Code:
    <?
    phpinfo
    ();
    ?>
    and it'll display all of your php settings. PHP.ini's location is found by looking for the value of "Configuration File (php.ini) Path" (near the very top).

    If you then open that file in notepad, and find (ctrl+f) allow_url_fopen - the line it finds will look something like:
    PHP Code:
    ;allow_url_fopen On 
    or maybe even:
    PHP Code:
    allow_url_fopen Off 
    change it to:
    PHP Code:
    allow_url_fopen On 
    By using a menu that I include I avoid the hassle of changing numerous pages when I change the navigation around
    I know that. do you use absolute paths in your menu, though?
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  5. #5
    Addicted to the Source of Life PowerBit's Avatar
    Join Date
    Feb 2004
    Location
    Loveland Co
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Again thanks to the young wiz!

    So I create a php file and in it, just put:
    PHP Code:
    <?
    phpinfo
    ();
    ?>
    Where will it display all of my php settings? How do I open this file? Where do I create this file?

    To get the "Configuration File (php.ini) Path" (near the very top), I hit (ctrl+f) once there and look for this line:
    PHP Code:
    ;allow_url_fopen On 
    Pardon me, but what is an absolute path?

  6. #6
    Addicted to the Source of Life PowerBit's Avatar
    Join Date
    Feb 2004
    Location
    Loveland Co
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey if I don't hear from ya. Could you check back tomorrow about this time. I'll be eating soon. And by the way I am thankful for your willingness to help. Many people get prideful in their knowledge and just show boat and complain and fuss about your lack of understanding. But I'll tell ya if you avoid all that and stay humble and serve people, you'll be rich. If your donation is a stable transaction place I got $15 if you can get me pointed in the right direction. Might even have some future work for ya if you have polished skills. Thanks bud!

  7. #7
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    Where will it display all of my php settingsHow do I open this fileWhere do I create this file
    You put it in your web root folder (where you store PHP files), and open it up on your localhost (where you open PHP files).

    An absolute url is a URL from the base root of the files. For example, if I was on http://www.example.com/folder/somefile.html, if it had:
    Code:
    <a href="/index.php">
    That would link to:
    http://www.example.com/index.php.

    because the beginning slash tells it to start at the root of the server.

    Oh, btw thanks for the offer. The donation link is secure (Paypal). If you have jobs for me (and this goes for everyone else who may want to aswel), add me on MSN messenger: arkinstall@hotmail.co.uk

    alternatively, if you don't have MSN, you can either PM or email me.
    Thanks,
    Jake Arkinstall
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •