Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: php - require_once not working with variables... |
|
Author |
|
bjwarshaw
Joined: 22 Jun 2006 Posts: 8 Location: VA
|
Posted: Thu 22 Jun '06 21:47 Post subject: php - require_once not working with variables... |
|
|
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: 7371 Location: Germany, Next to Hamburg
|
Posted: Wed 28 Jun '06 18:58 Post subject: |
|
|
^^ 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 |
|
|
|
|
|
|