Inserting a php file into a mysql database
Inserting a php file into a mysql database
am 25.12.2005 23:01:01 von Thomas Bonham
Hello,
I am trying to insert a php page into a database. I need to know if
there is something that I need to do when setting up the table, also is
there something to do with the code.
Thank You for your help
Thomas
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Inserting a php file into a mysql database
am 25.12.2005 23:07:44 von John in Pueblo
On Sunday 25 December 2005 3:01 pm, Thomas Bonham wrote:
> Hello,
>
> I am trying to insert a php page into a database. I need to know if
> there is something that I need to do when setting up the table, also is
> there something to do with the code.
>
> Thank You for your help
>
> Thomas
Well, you could use fopen() to open the file, get a pointer, then insert the
contents into the database. I'm wondering why you need to insert a php page
into a database, though.
--
Dr. Joseph Dolan: Isn't there a children's book about an elephant named Babar?
Fletch: I don't know. I don't have any.
Dr. Joseph Dolan: No children?
Fletch: No, elephant books.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Inserting a php file into a mysql database
am 26.12.2005 06:01:26 von Julien Bonastre
Yes.. Odd to say the least
:-)
---oOo--- Allowing users to execute CGI scripts in any directory should only
be considered if: ... a.. You have no users, and nobody ever visits your
server. ... Extracted Quote: Security Tips - Apache HTTP
Server ---oOo--- ------oOo---------------oOo------ Julien Bonastre
[The_RadiX] The-Spectrum Network CEO ABN: 64 235 749 494
julien@the-spectrum.org
www.the-spectrum.org ------oOo---------------oOo------
----- Original Message -----
From: "John Meyer"
To:
Sent: Monday, December 26, 2005 8:07 AM
Subject: Re: [PHP-DB] Inserting a php file into a mysql database
> On Sunday 25 December 2005 3:01 pm, Thomas Bonham wrote:
>> Hello,
>>
>> I am trying to insert a php page into a database. I need to know if
>> there is something that I need to do when setting up the table, also is
>> there something to do with the code.
>>
>> Thank You for your help
>>
>> Thomas
>
>
> Well, you could use fopen() to open the file, get a pointer, then insert
> the
> contents into the database. I'm wondering why you need to insert a php
> page
> into a database, though.
> --
> Dr. Joseph Dolan: Isn't there a children's book about an elephant named
> Babar?
> Fletch: I don't know. I don't have any.
> Dr. Joseph Dolan: No children?
> Fletch: No, elephant books.
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Inserting a php file into a mysql database
am 26.12.2005 16:26:49 von El Bekko
Thomas Bonham wrote:
> Hello,
>
> I am trying to insert a php page into a database. I need to know if
> there is something that I need to do when setting up the table, also is
> there something to do with the code.
>
> Thank You for your help
>
> Thomas
Use file_get_contents() I'd say... but you'll have the problem the file
executes :S
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: Inserting a php file into a mysql database
am 26.12.2005 16:31:41 von John in Pueblo
On Monday 26 December 2005 8:26 am, El Bekko wrote:
>
> Use file_get_contents() I'd say... but you'll have the problem the file
> executes :S
Which is why I told him just to treat the php file like a text file (which is
what it really is) and use fopen to grab the file, read its contents into a
string, and insert that into the database.
--
Dr. Joseph Dolan: Isn't there a children's book about an elephant named Babar?
Fletch: I don't know. I don't have any.
Dr. Joseph Dolan: No children?
Fletch: No, elephant books.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php