How can rewrite function require or include php ?
Moderator: General Moderators
How can rewrite function require or include php ?
hi all, i' new. How can rewrite function require or include php ? to add something my code.thk all
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: How can rewrite function require or include php ?
What do you want to do?
Re: How can rewrite function require or include php ?
i want before require one file i will check it and remove something in code. I want rewrite some function of php ex : require, die, include or global.
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: How can rewrite function require or include php ?
I dont think you can, but you can write your own function.
I still dont get what you want to do, can you give a full example?
Why noy just write your function and do the bits you want then put the include where you want?
I still dont get what you want to do, can you give a full example?
Why noy just write your function and do the bits you want then put the include where you want?
Re: How can rewrite function require or include php ?
hi it's just a idea. ex :jaoudestudios wrote:I dont think you can, but you can write your own function.
I still dont get what you want to do, can you give a full example?
Why noy just write your function and do the bits you want then put the include where you want?
Code: Select all
$config['xx'] = 'abc';
class process
{
private $config;
function __contructor()
{
global $config;
$this->config = md5($config['xx']);
}
function do($comp)
{
//i don't want someone use global or require some files other from here or in a.php, b.php,...
switch($comp)
{
case 'a' : require('a.php');break;
case 'b' : require('b.php');break;
case 'b' : require('b.php');break;
}
}
}
$t = new process;
$t->do($_GET['comp']);
-
Mark Baker
- Forum Regular
- Posts: 710
- Joined: Thu Oct 30, 2008 6:24 pm
Re: How can rewrite function require or include php ?
You can, but only using the APD extension.jaoudestudios wrote:I dont think you can, but you can write your own function.
I'm still puzzled by what the OP is trying to achieve as well.
Re: How can rewrite function require or include php ?
thk for help i looking for apd extension. i using vertrigo on win, hard to find php_apd.dll i downloaded http://vn.php.net/releases all Windows Binaries of php 5.2.6 and 5.2.8 but could not find php_apd.dll. Any way to rewrite ?Mark Baker wrote:You can, but only using the APD extension.jaoudestudios wrote:I dont think you can, but you can write your own function.
I'm still puzzled by what the OP is trying to achieve as well.