473,597 Members | 2,839 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Parsing PHP sourced from blob

When a php statement is "part" of a markup snippet in a mysql database
table field, what must be done to have the php parse in the document.
The php tags are being displayed

A simple demo demonstrating my problem is at
http://www.boclair.com/test/blobvars.php

Louise
Jul 17 '05 #1
4 2247
boclair wrote:
When a php statement is "part" of a markup snippet in a mysql database
table field, what must be done to have the php parse in the document.
The php tags are being displayed

A simple demo demonstrating my problem is at
http://www.boclair.com/test/blobvars.php

Louise


Try looking here: <http://uk.php.net/eval>

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/
Jul 17 '05 #2
Try http://www.php.net/eval, the eval() function should do the job!

http://www.DevPlug.com --Connecting Developers
Posted from: http://www.devplug.com/ftopic{TOPIC_ID }.htm
Jul 17 '05 #3
Philip Ronan wrote:
boclair wrote:

When a php statement is "part" of a markup snippet in a mysql database
table field, what must be done to have the php parse in the document.
The php tags are being displayed

A simple demo demonstrating my problem is at
http://www.boclair.com/test/blobvars.php

Louise

Try looking here: <http://uk.php.net/eval>


Thanks but I need more help

I applied eval as

if (ISSET($myrow['detail'])){$detail=$myr ow['detail'];}
$detail=addslas hes($detail);
eval("\$detail = \"$detail\"; ");

where detail is the blob field.

The result is at http://www.boclair.com/test/blobvars2.php
The image src is line (bolded) still wrong. The value of the page
variable is being contained in the PHP tags.

By removing the PHP tags on the src statement, the document renders
correctly as shown at http://www.boclair.com/test/blobvars3.php

By also removing the php tags in the style attributes, these are also
rendered correctly as shown at http://www.boclair.com/test/blobvars4.php

Does this mean that PHP tagging should not be used in blob values?

Louise
Jul 17 '05 #4
boclair wrote:
Does this mean that PHP tagging should not be used in blob values?


I guess so. Perhaps you could use a regular expression to split the
fragments apart so that the content of the php tags is sent to the eval()
function and everything else is sent out as literal text.

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
6111
by: Carolyn Longfoot | last post by:
Help! This is driving me crazy... I'm trying to read a BLOB from a db and display it in a browser, like so: $query="SELECT blob from table where blob_id=9"; $result=mysql_query($query); $blob=mysql_fetch_assoc($result); Now when I do print_r (array_values($blob));
2
467
by: Antonio D'Ottavio | last post by:
Good Morning, In my web page I've a datalist that is sourced by a database, the problem is that I want that one of the column of the datalist contain a dropdownbox that also is sourced by a table in the database. <asp:DropDownList id="ComboTipoPartita" runat="server" DataValueField="IDTipoPartita" DataTextField="DescrizioneTipoPartita" DataSource="<% BindComboTipoPartita() %>"
0
1251
by: Antonio D'Ottavio | last post by:
Good Morning, In my web page I've a datalist that is sourced by a database, the problem is that I want that one of the column of the datalist contain a dropdownbox that also is sourced by a table in the database. The problem is is the error : System.NullReferenceException: Reference to an Object not setted on a object instance
3
7296
by: Carmine | last post by:
I have to add a date column to a db2/zos table with a blob column. Can I rename the blob table to old, create a new table with the date column, then insert/select the data from the old table? Do I have to select data from the main table and the aux table or is the aux table done automatically? What's the best way to handle this?
2
2758
by: Trip | last post by:
Hello all, Is there anyway to store an array to MS Access 2002 without parsing the entire array row-by-row. For example, Oracle allows you to store BLOBs (binary large objects). I would like to be able to say in VB/VBA With rstName .AddNew !fieldName = ArrayName .Update
2
6496
by: Vinciz | last post by:
hi guys... im new in java and i would love to learn some of these... basically i got a sample code to retrieve the blob from the mysql. however, i dont really know what to do with these retrieved byte/binary data as i got no idea on how to save them in our pc. For this situation, what i need to do is give the byte/binary data an extension (retrieved from another field in the table) in order to revert back to the original data i had in the...
9
7971
by: matt | last post by:
hello, im doing my first ASP.NET app that inserts & retrieves files from Oracle (no need for a discussion on *that*!). i learned first-hand of the somewhat awkward technique for inserting binary data into an Oracle BLOB column via ADO.NET. since my files are larger than 33k, it seemed had to use this technique: http://support.microsoft.com/default.aspx?scid=kb;en-us;322796
22
2045
by: yang__lee | last post by:
Hi, I hope you may help me. Please check the attached text file. Actually its a report file with some headers information and them report is in tabular format. I want to parse each row and get the values. I think strtok won't work here.
4
4230
by: skunapareddy | last post by:
I am needing to read a blob from database and pass it to another java program. I researched internet and found a program that reads a file on the client pc and gives bytes, but when I modified the code to read a blob from DB I am not having any luck, I am running this java programs using JDEVELOPER. Can anyone please give me some help? The code is as follows: ... private static byte getBytesFromBlob(Blob blob) throws Exception { ...
0
7967
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7885
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8272
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8258
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5847
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3923
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2403
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1493
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1233
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.