Hmm, whilst that would work (provided no variables require global usage etc), I wouldn't recommend it. It basically requests the file from the server, which a) consumes bandwidth, b) is simply a poor coding practice, and c) severly limits the script's functionality and capability.
| |
|
Welcome to KnowledgeSutra - Dear Guest | |
Include File.php?id=something
Started by Amezis, Jan 29 2006 06:08 PM
14 replies to this topic
#12
Posted 03 February 2006 - 02:17 AM
Spectre, on Feb 2 2006, 04:52 AM, said:
Hmm, whilst that would work (provided no variables require global usage etc), I wouldn't recommend it. It basically requests the file from the server, which a) consumes bandwidth,
is simply a poor coding practice, and c) severly limits the script's functionality and capability.
#13
Posted 03 February 2006 - 10:52 AM
Isn't the correct use of include is
include("filename.php"); ?
I allways get error when using include with parameter like :
include("filename.php?get=1");
Because php read that as open a 'filename.php?get=1' file that you dont have. But you only have 'filename.php'
include("filename.php"); ?
I allways get error when using include with parameter like :
include("filename.php?get=1");
Because php read that as open a 'filename.php?get=1' file that you dont have. But you only have 'filename.php'
#14
Posted 03 May 2008 - 04:46 PM
Why you are trying to access include file with get variable. Include method fetches the full code of the file you are trying to access without its execution. Then the place where include function is implemented is replaced with the code fetched from the file.
Only after that, PHP Parser executes the file. So it is meaningless to use variables on include files.
Only after that, PHP Parser executes the file. So it is meaningless to use variables on include files.
#15
Posted 24 December 2011 - 01:33 PM
Can someone help me I'm also trying to get php include using php?id=
here a code i used on my myspace.php
Error Message
<?php include("myspace.php?id=108001502"); ?>
here a code i used on my myspace.php
<object type="application/x-shockwave-flash" data="http://mediaservices.myspace.com/services/media/embed.aspx/m=<?php echo $_GET["id"]; ?>" width="593" height="465"><param name="movie" value="http://mediaservices.myspace.com/services/media/embed.aspx/m=<?php echo $_GET["id"]; ?>" /><param name="quality" value="high" /><param name="scale" value="noorder" /><param name="wmode" value="transparent" /><param name="allowscriptaccess" value="never" /><param name="allownetworking" value="internal" /><param name="allowfullscreen" value="true" /></object>
Error Message
Warning: include(myspace.php?id=108001502) [function.include]: failed to open stream: No such file or directory in /home/web/domains/website.com/public_html/video/index.php on line 56 Warning: include() [function.include]: Failed opening 'myspace.php?id=108001502' for inclusion (include_path='.:/usr/local/lib/php') in /home/web/domains/website.com/public_html/video/index.php on line 56
Edited by tokyosama, 24 December 2011 - 01:45 PM.
Reply to this topic

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users















