logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 



Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.



php - require_once not working with variables...

 
Post new topic   Reply to topic    Apache Forum Index -> Coding & Scripting Corner



View previous topic :: View next topic  
Author Message
bjwarshaw



Joined: 22 Jun 2006
Posts: 8
Location: VA

PostPosted: Thu 22 Jun '06 21:47    Post subject: php - require_once not working with variables... Reply with quote

Hey guys,

Everything seems to be running fine, even my image rotation scripts, but any of my require_once instances that involve variables (<?php require_once ("$page.html") are not working. Non-variable requires are functioning perfectly.

I'm running 5.1.4 on Apache 2.2.2 on XP Pro SP2 with the Visual C++ Redistributable.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6255
Location: Germany, Next to Hamburg

PostPosted: Wed 28 Jun '06 18:58    Post subject: Reply with quote

^^ If you use a variable don't use quotes in require(_once) or in include(_once)

e.g.
Code:

<?php
require_once ($page.".html");
?>
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Coding & Scripting Corner
Page 1 of 1