Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Include File.php?id=something


14 replies to this topic

#11 Spectre

    Privileged Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 873 posts

Posted 02 February 2006 - 09:52 AM

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.

#12 michaelper22

    -=Hybrid Bus=-

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 742 posts
  • Gender:Male
  • Location:My hybrid bus (in NYC), a computer
  • Interests:Not interested in anything
  • Spam Patrol

Posted 03 February 2006 - 02:17 AM

View PostSpectre, 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, :rolleyes: is simply a poor coding practice, and c) severly limits the script's functionality and capability.
Yeah, but it accomplishes what [I forgot his name who started this topic] wanted to do, passing a variable to the other script through a quertstring variable.

#13 silentwind

    Newbie

  • Kontributors
  • Pip
  • 7 posts

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'

#14 ivenms

    Member [Level 1]

  • Kontributors
  • PipPipPipPip
  • 52 posts

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.

#15 tokyosama

    Newbie

  • Kontributors
  • Pip
  • 1 posts

Posted 24 December 2011 - 01:33 PM

Can someone help me I'm also trying to get php include using php?id=


<?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


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users