Welcome Guest ( Log In | Register)



2 Pages V  < 1 2  
Reply to this topicStart new topic
> Include File.php?id=something, using the include() function
Spectre
post Feb 2 2006, 09:52 AM
Post #11


Privileged Member
*********

Group: Members
Posts: 874
Joined: 30-July 04
Member No.: 246



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.
Go to the top of the page
 
+Quote Post
michaelper22
post Feb 3 2006, 02:17 AM
Post #12


-=Hybrid Bus=-
*********

Group: Members
Posts: 744
Joined: 2-November 05
From: My hybrid bus (in NYC), a computer
Member No.: 13,709
Spam Patrol



QUOTE(Spectre @ Feb 2 2006, 04: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, cool.gif 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.
Go to the top of the page
 
+Quote Post
silentwind
post Feb 3 2006, 10:52 AM
Post #13


Newbie
*

Group: Members
Posts: 7
Joined: 2-February 06
Member No.: 18,052



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'
Go to the top of the page
 
+Quote Post
ivenms
post May 3 2008, 04:46 PM
Post #14


Member [Level 1]
****

Group: Members
Posts: 53
Joined: 6-August 06
Member No.: 27,912



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.
Go to the top of the page
 
+Quote Post

2 Pages V  < 1 2
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Getting List Of Directories And Files Using Php(6)
  2. Script: Php Jukebox(4)
  3. I Need Help With File Edit In Php(6)
  4. How To Use A Link To Call Function In Php?(8)
  5. Help Php: How To Load String From Text File (solved)(9)
  6. Php Help Needed Including File In A Page.(2)
  7. How Good Is This Data Cleaning Function?(2)
  8. The Extract() Function(6)
  9. Error With Joomla Template(1)
  10. [php] Header Function(2)
  11. [php](simple) Using Functions To Combine Values In A Form(2)
  12. Edit .txt File In Ftp Via Webpage(2)
  13. [php]simple Flat File Text Manipulator(3)
  14. Mail() Clone(5)
  15. The Best Zip Function(1)
  1. Php Explode Function Help(4)
  2. <?php ?> Unique Visitors Script(2)
  3. How To Check If Fsockopen Function Is Enabled?(2)
  4. File Upload(1)
  5. No File Extension(3)
  6. Php And Flash Image Gallery(5)
  7. Arrays Outside A Function(3)
  8. File Checker-how To Check File Whith Html Through Html?(2)
  9. Updating Php File Through A Web Form(5)
  10. Endif function?(6)
  11. Need Some Help In File Browser(8)
  12. Php Configuration File(16)
  13. PHP Function To Add Previous and Next Page Feature(0)


 



- Lo-Fi Version Time is now: 25th July 2008 - 09:50 PM