Could some one please tell me why, when I run the following
php code:
the tags do not appear in output to my firefox browser?
The HTML tags do not appear because parsing stops due to the missing closing php tag. You probably do not have errors displayed by default so you do not see the error. Running on my system on the command line gives exactly the error.
Quote:
X-Powered-By: PHP/5.1.4
Content-type: text/html
<br />
<b>Parse error</b>: syntax error, unexpected '<' in <b>/home/cbkihong/-</b> on line <b>13</b><br />
hi,
why my uploaded images are not visible both in front-end and back-end of my CMS ?
See the picture:
http://dl-client.getdropbox.com/u/72686/noPics.png
I checked the GD library in php. It seems ok...
http://dl.getdropbox.com/u/72686/GD.png
thanks
---------- Post updated at... (0 Replies)
Hi,
I have a strange problem. when i do ls i see a folder, say 'abc', but it disappears when i do ls -l. I cannot access or mv that folder. Solaris 10 (SPARC) doesn't allow me to create a new folder with the same name, as it already exists.
'file' command also doesn't recognize i 'abc'... (10 Replies)
Hi guys,
Need ur help again.
Source File is coming like this. sample two records are below:
<?xml version="1.0"?>
<Object>
<Header>
<XCOMVers>V1.0</XCOMVers>
<REPORT>XXXXX</REPORT>
<CODE>002</CODE>
</Header>
<IssueCard>
<Record>
<L>CAR SYSTEM -SSSSS ... (3 Replies)
Hi All,
I'm stuck with adding multiple lines(irrespective of line number) to a file before a particular xml tag. Please help me.
<A>testing_Location</A>
<value>LA</value>
<zone>US</zone>
<B>Region</B>
<value>Russia</value>
<zone>Washington</zone>
<C>Country</C>... (0 Replies)
I've got two different files and want to compare them.
File 1 :
HTML Code:
<response ticketId="944" type="getQueryResults"><status>COMPLETE</status><description>Query results fetched successfully</description><recordSet totalCount="1" type="sms_records"><record... (1 Reply)
Hi ,
I have a below xml:
<ns:Body>
<ns:result>
<Date Month="June" Day="Monday:/>
</ns:result>
</ns:Body>
i have a lookup abc.txtt text file with below details
Month June July August
Day Monday Tuesday Wednesday
I need a output xml with below tags
<ns:Body>
<ns:result>... (2 Replies)
OS : SunOS 5.8
I am trying to add a user ad3059 to the following groups,
A B C D ( four groups A,B,C,D)
When i use usermod command and add the user to the above groups,
and go to
> groups ad3059
other C D
It doesnt show A and B groups and shows it as other.Please advice on how... (13 Replies)
I'm searching for the names of a TV show in the XML file I've attached at the end of this post. What I'm trying to do now is pull out/list the data from each of the <SeriesName> tags throughout the document. Currently, I'm only able to get data the first instance of that XML field using the... (9 Replies)
Discussion started by: hungryd
9 Replies
LEARN ABOUT PHP
get_meta_tags
GET_META_TAGS(3) 1 GET_META_TAGS(3)get_meta_tags - Extracts all meta tag content attributes from a file and returns an arraySYNOPSIS
array get_meta_tags (string $filename, [bool $use_include_path = false])
DESCRIPTION
Opens $filename and parses it line by line for <meta> tags in the file. The parsing stops at </head>.
PARAMETERS
o $filename
- The path to the HTML file, as a string. This can be a local file or an URL.
Example #1
What get_meta_tags(3) parses
<meta name="author" content="name">
<meta name="keywords" content="php documentation">
<meta name="DESCRIPTION" content="a php manual">
<meta name="geo.position" content="49.33;-86.59">
</head> <!-- parsing stops here -->
(pay attention to line endings - PHP uses a native function to parse the input, so a Mac file won't work on Unix).
o $use_include_path
- Setting $use_include_path to TRUE will result in PHP trying to open the file along the standard include path as per the
include_path directive. This is used for local files, not URLs.
RETURN VALUES
Returns an array with all the parsed meta tags.
The value of the name property becomes the key, the value of the content property becomes the value of the returned array, so you can eas-
ily use standard array functions to traverse it or access single values. Special characters in the value of the name property are substi-
tuted with '_', the rest is converted to lower case. If two meta tags have the same name, only the last one is returned.
EXAMPLES
Example #2
What get_meta_tags(3) returns
<?php
// Assuming the above tags are at www.example.com
$tags = get_meta_tags('http://www.example.com/');
// Notice how the keys are all lowercase now, and
// how . was replaced by _ in the key.
echo $tags['author']; // name
echo $tags['keywords']; // php documentation
echo $tags['description']; // a php manual
echo $tags['geo_position']; // 49.33;-86.59
?>
NOTES
Note
Only meta tags with name attributes will be parsed. Quotes are not required.
SEE ALSO htmlentities(3), urlencode(3).
PHP Documentation Group GET_META_TAGS(3)