SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
-
Jun 25, 2007, 11:53 #1
- Join Date
- Mar 2007
- Posts
- 196
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Get Contents By Passing Variables
I want to grab the contents of a file but I need to pass a variable to the file I'm getting the contents from. Here is what I tried but it doesn't work:
PHP Code:$Var = "test";
$Contents = file_get_contents("test.php?var=$Var")
Code:Warning: file_get_contents(test.php?var=test) [function.file-get-contents]: failed to open stream: Invalid argument in ../index.php
MattKayzio - We don't hesitate, we accelerate.
-
Jun 25, 2007, 12:03 #2
- Join Date
- Mar 2007
- Posts
- 196
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
nvm i figured out a better way of achieving this using includes instead
Kayzio - We don't hesitate, we accelerate.
Bookmarks