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

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.


Post new topic   Forum Index -> Coding & Scripting Corner View previous topic :: View next topic
Reply to topic   Topic: php - require_once not working with variables...
Author
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: 7104
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


Reply to topic   Topic: php - require_once not working with variables... View previous topic :: View next topic
Post new topic   Forum Index -> Coding & Scripting Corner