How Can I Get Php To Read A Html Extention?
I would like to get php to parse a regular .html page. I just don't know where and which file I need to edit to add the html?
View Complete Forum Thread with Replies
Related Forum Messages:
Changing The Extention
i just added the following to the htacess file on the server to get php5 working AddHandler x-httpd-php5 .php problem is when i try to open the dir on the localhost it will not open. ive tryed deleting the htacess file but this does not help. The message is "you have chosen to open which is a :application/xhttp-php from http://localhost what should firefox do with this file?
View Replies !
Server Extention
This should be a simple question for you professionals. I want to take my page.php files and make them read page.htm. How do i do this? What i'd like to do is this, perhaps i'm going about it all wrong. I'd like to make it so when i post my url i don't have to put the extention in like this... mydomain.com/index.php. I'd like it to read like this... mydomain.com/index/
View Replies !
Hide Php File Extention
I noticed on most sites, there are no file extentions. Just urls like mydomain.com/action?something&result=this and there is no file extention. An example of this is digg.com. I know its a php site but theres no file extention to be found. At first i was thinking they used mod_rewrite to get rid of the file extention, but i dont think that anymore.
View Replies !
Make Php Interpret .jad-extention
I would like to make php interpret .jad-extention. I have managed to do it with .wml, but I can't understand why it doesn't do the same with .jad. All the PHP-code is still showing in the file as plain text. Code:
View Replies !
PhpBB Classified Ad Extention Installation
Trying to install the phpBB classified ad extension for phpBB. Getting the following error/s Warning: include(./language/lang_english/lang_main_ads.php) [function.include]: failed to open stream: No such file or directory in /home/namibiac/public_html/ads_mod/ads_common.php on line 37 ...
View Replies !
Separating Filename From File Extention
I need some code on how to take a file name and extention and seperate them from eachother and put them into two separate variables. The PHP book I have, from Sams, doesn't have anything about that subject at all. All they have is manipulating the file contents, and finding out information about the file.
View Replies !
Read From A Html Site
I want to read a html site on the net. And the php script must catch (or better parse?) all the data between <td> </td> to put it in a txt file. Can anyone of you help me out? <TABLE bgColor=#cccccc border=1 cols=5 width="100%"> <TBODY> <TR> <TD>Gabler Joachim</TD> <TD> </TD> <TD>Goethestr. 5, 14163 Berlin</TD> <TD> 030-809729-0</TD> <TD> </TD></TR> <TR> <TD>Gabriel Christian</TD> <TD> </TD> <TD>Otto-Suhr-Allee 97, 10585 Berlin</TD> <TD>030-3416024</TD> <TD>030-3419042</TD></TR>.
View Replies !
Read An HTML Page
It may sound kind of crazy, but I'm trying to see if there's a way php code can 'read' contents of a static HTML page and store the contents into a variable. Is it possible? If so, how?
View Replies !
Read Html Table With Php
how to read an html table with PHP and parse it. I have numerous web pages, each containing one html table and with one .gif graph. I want to parse the html table and insert as a record into mysql. Unfortunately, it is not in XML which would make this easier.
View Replies !
Read File With Html
I have a PHP program that throws some text into a file. Later I display it using the code below (php and html). But I'm trying to hop up the code a little and would like to bold/blink/underline just a few lines of the output. I've inserted the HTML Code: <b> xx </b> into the file along with the text at selected points. When it reads it it just puts HTML Code: </b> </i> </blink> right onto the screen. PHP Code: ....
View Replies !
How To Read HTML Email Text?
I've done a couple of hours web-searching without turning up many answers so far, and I guess I could figure it out (eventually) from the MIME format, but here goes with my question... I don't have any problems reading text emails, but can anybody direct me to some PHP source code that will read (the text inside) an HTML email, specifically the "From", "Subject" and especially the message body? I would like the code to be able to differentiate between (i.e. know that it is) a text or an HTML email, and I would like the code to ignore any attachments. I don't expect the incoming email to have any (or large) attachments, but I hope that any code samples can handle the possible case of big attachments coming along for the ride. Incidentally, if I did (not this time) want to handle large attachments, can PHP and/or servers handle megabytes of data being read into a string variable through fread()? I'm just getting into this stuff, and not sure of what areas would be a resource and/or performance hog.
View Replies !
Analyze And Read In Html File
what i want is something similar to th simple-xml extension of php, but for html. I have to analyze and read in certain tags from a html file in a comfortable manner. Is there a php extension/library which makes this possible?
View Replies !
Read A Directory Files, And Create Echo HTML?
i have a foo/ directory and a foobar/ directory, and a barfoo/ directory in root/ for each directory in root, i'll put x or y or z amount of images in each directory. then, have the php write 01.html with the correct links to a) main image, b) thumb images and prev/fwd links. we could have separate php files to handle the drawing of the new sequenced .html files in each directory (probably best to pass variables), because they're slightly different, or one to rule them all (sounds like too much work). then, the syntax would need to be sorted out (so index.html has a link to foo/foo.php?=foo01) would work correctly and draw up 01.html with the correct images, being that index.html would probably have to have hardcoded variable-passing links. eh? it's sweet, 'cause updating would be fast. upload and delete image files. done. I mean, I know that you could go the database/XML route, but sigh ........
View Replies !
Email With Attachment - Annot Be Accessed. The File May Be Read-only, Or You May Be Trying To Access A Read-only Location.
It is a basic email with an attachment. The email and attachment are getting sent and received ok. When the recipient tries to open the attachment, the right application opens (eg. Excel) but then throws up an error. I am using base64 encoding. For example: .xls file with base64 encoding: 'testing.xls' cannot be accessed. The file may be read-only, or you may be trying to access a read-only location. Or, the server the document is stored on may not be responding. .pdf file with base64 encoding: There was an error opening this document. The file is damaged and could not be repaired. so the file isn't being decoded right. I have tested on Yahoo and Outlook. PHP Code:
View Replies !
Fgetcsv Returns False In Dynamic Read Vs. Hard-coded Read ??
I am working with directories in PHP for the first time. I have code that I've changed multiple times to try different things. I would think this is pretty standard fare so I'm not sure why I can't seem to get it right. What I would like to see happen: The code opens the directory and loops through the files, opening them and processing them. What is happening: If I hard code the name of one particular file (it is always the same file) in my test setting, fgetcsv does not return false and the code runs fine. The file is parsed and all is well. However, if I let the code open a directory and then loop through the files, this one particular txt file does not work. For debug purposes, I have it displaying each file name and it can display the name, it just won't process it. I've even tried setting a for loop and hard coding each file name (since right now I know the names - I won't in the future) and the file is processed. It is only when it is set to my $file var dynamically rather than being hard coded. Here is the code: $handle_dir = opendir('../directory_name'); /* loop over the directory. */ $countfile=0; while (false !== ($file = readdir($handle_dir))) { $countfile++; $filevalues = ""; //Skip the first two files that where found because they are "." and ".." if ($countfile 2) { //echo $file; //begin loop through each file name $handle = fopen($file, "r"); echo "Filename is: $file<BR>";//at this point the code can print the file name if (false == ($filevalues = fgetcsv($handle,6021,','))){ echo 'problems<br>'//for one particular file, this always displays }
View Replies !
Read (and ONLY Read) A Multi-sheets Excel File With PHP.
I want to read (and ONLY read) a multi-sheets Excel file with PHP. I found so many scripts on the net that I finally don't know what to choose so... could experimented users help me to directly find the one that I need ? Here are the two obvious things the script must match : - free - can read multi-sheets Excel files
View Replies !
How To Read Up To A Point And Assign The Read Value To An Array.
Open a text file which will look something like this: QuoteLink 1 http://www.blahblah.com/1651561 Link 2 http://www.etc.com/34324 Link 3 http://www.sdfkjsdf.com/12343423 basically its a "Link n" text followed by a URL text in the format of "http://www.page.com/random numbers" What I would like the php script to do is to read "Link n" text and output it with the a http link to the URL which follows it. That is it should look something like this in the output: Link 1 Link 2 Link 3 I have learned how to read a text file with php so far but I have no idea how to make it read up to a point and assign the read value to an array.
View Replies !
HTML Email Using PHP Problem (Receive Html Tags)
When I send the html email, the only thing I receive is the tags (the html codes basically). I want to be able to see the email like a html page, what is wrong with my code? Here is a copy paste of it. $HTML = "</html><body><img src='http://www.somewebsite.com/ someimage.jpg'></body></html>"; $headers = "From: $from "; $headers .= "MIME-Version: 1.0 "; $boundary = uniqid("HTMLDEMO"); // Now we attach the HTML version $headers .= "--$boundary ". "Content-Type: text/html; charset=ISO-8859-1 ". "Content-Transfer-Encoding: base64 "; $headers .= chunk_split(base64_encode($HTML)); mail($to,$subject,"",$headers); print "mail Sent<br>"; The email I receive has this as text: </html><body><img src='http://www.somewebsite.com/someimage.jpg'></ body></html>
View Replies !
RemoveHandler .html .htm (parse Php In .html Files)
I want to parse php in .html files. I put this in .htacces file: RemoveHandler .html .htm AddType application/x-httpd-php .php .htm .html Its work, but some of my php aplications have urls: www.mysite.com/this-is-page without .html in the end how to parse that? Which code I must use.
View Replies !
Embed Php Generated Html In Another Html Page
I am trying to include some php generated html in a page that is just a standard html file, NOT a php file. I have seen other html pages do this by including an src to the cgi script in script tags, like this: <script src="http://someurl.com/somescript.cgi"></script> the html page loads and the script is executed and the returned html is displayed in the calling page. So, I tried this: <script src="http://someurl.com/somescript.php"></script> It doesnt work!!
View Replies !
.html' Page Be Replaced By '.html.php'
Can a '.html' page be replaced by '.html.php' page via RewriteRule? To clarify, I'm using a software that formats the look of the site using .html pages. I'd like to add PHP code to that page but of course, it is not of the right page type. What I was wondering is Could I create a duplicate of that '.html' page, rename it to .g. '.html.php' and make the revisions and then just create a RewriteRule that redirects the '.html' page to the '.html.php' without generating an error? The alternative and undesired way of doing it would be to rename the original page to '.html.php' and find and revise ALL of the routines that call that page. That would create a revision nightmare especially upon upgrading the software.
View Replies !
Can PHP Read Another Url
Is there a function in php that can get a url and not parse the php if it is a .php file? Like: $Capturedhtml = file_get_contents($GetURL); will this work on a .php without parsing the php?
View Replies !
Php.ini Not Being Read
i have php/apache/mysql on freebsd. i specified the location of the php.ini file (./configure --with-config-file-path=/usr/local/php/blah/php.ini). i am trying to disable the default global vars definition. i looked at phpinfo() and it says the php config file is that path, yet after i turned register_globals to on, it still says off so i guess its not reading the file. so, basically i need to know if there is something with apache i need to do??? oh yea....php is installed as a dso module.
View Replies !
Read An Flv With Php?
I want to read an flv file with php. For example, determine the length (time) of the movie. Or generate thumbnail images from it. Does such a library exist?
View Replies !
Read XML In Php?
I have this feed: http://www.slougheaz.org/xml2/feed_two.xml Which is a pure XML feed (not an RSS one). How can I go about reading it in a browser using php? I was told of simplexml, but is that just not for parsing an RSS XML document when this is a pure XML document? If so what other ways can I use to let php read the file?
View Replies !
Changes To Php.ini Not Being Read Through
PHP 5.1, Windows Server 2003, IIS 6, isapi I changed a line in the php.ini file to extension_dir = "c:phpext" but when I load my phpinfo page it shows extension_dirC:php5 It's like my change didn't take effect. I restarted the world wide web publishing service, but still the same thing. What do I do to make the change take effect? I cannot simply reboot the server. It is remote and hangs on restart, so I have to do this without a reboot.
View Replies !
Read Only
I'm trying to figure out how to make the name files read only once they create it through php with an account maker. This is being made for a game called Open Tibia. When players die they will lose experience and equipment. I COULD do it manually but then i'd have to do it every 2 seconds because people will constantly make accounts.
View Replies !
Read XML
I want a .php script to read a XML file and list all the nodes ie: <Header>test</Header> <Job>Manager</Manager> PHP Code: echo $Header; echo $Job;
View Replies !
Read Bookmarks (or Xml)
All right so I installed the latest APB and I wan't to import all my Mozilla bookmarks into it but the problem is that it would take almost an hour to do it manually. So instead i'll spend a few hours coding a script to do it in a second! So I wan't something to read the bookmark file and end up with a structured something (object, array, etc). I decided to get my hands dirty with XML (really dirty) but SAX doesn't read attributes and expat developpement seems to be in alpha stage (and it returns giberish anyway). I'm using moz 1.0 and the bookmark file is not strict xml/html/nothing really because there's not always an ending tag. How could I do this? Is there any existing package/technology to do this or shall I roll my own with fopen and the like?
View Replies !
Htaccess To Read XML As PHP
I'm trying to write a RSS feed which will pull info from a mySQL DB. In order for the server to read the XML file as PHP, I've uploaded a .htaccess file to my server with this code in it: AddType application/x-httpd-php .php .xml Then, my feed looks like this:
View Replies !
Read Log File With PHP?
It turns out that opendir and a number of other cool PHP features are disabled by my host. I've had to deal with similar issues before and have worked around them (that's part of the fun.) What I am trying to do is create a PHP file which will delete specific files from a directory that are more than 24 hours old. My question is this: Is this possible without readdir and opendir? Can I use fopen and fread as alternatives in my solution? The key problem that I see is that I can read the log file but where do I begin to parse the log file into file names and dates? Typical entries in my log file would look like this: 2007/05/02 2:00:31 : File http://www.example.com/myFile.zip Sent to someone@example.com 2007/05/02 2:08:31 : File http://www.example.com/myPic.jpg Sent to someone2@anotherexample.com I guess I would have to somehow define the format of each entry? If so how would I do this. Is this idea even realistic with PHP?
View Replies !
If I Set Cookie Using CGI, Can I Read It Using Php ?
if i set cookie using CGI, can i read it using php ? i have a cgi file that sets this cookie. #!/usr/bin/perl -w use CGI; my $query = new CGI; my $value = "testcookie"; my $cookie_out = $query->cookie(-name=>"myval", -value=>$value); print $query->header(-cookie=>$cookie_out); at the same site/ domain , how do i check the value in the myval cookie using php ? whats the php code example to read a cgi cookie ?
View Replies !
How To Read MIME In Php?
Does anyone know if there is a class that handles e-mail MIME messages reading in php due to create a very simple webmail? If there aren't classes built for these purpose, how can I do it?
View Replies !
Read Out Of The Database
could someone please write the code for read out of the database... here is my input code: $Host = "localhost"; $User = "david"; $Password = "david"; $DBName = "hej"; $TableName = "text"; $Link = mysql_connect ($Host, $User, $Password ); //$db = mysql_select_db($DBName,$Link) $Query = "INSERT into $TableName values (ཇ',དྷ',ཝ')"; print ("The query is:<BR>$Query<P>"); if (mysql_db_query ($DBName, $Query, $Link)) { print ("The query was successfully executed!<BR>"); } else { print ("The query could not be executed!<BR>"); { mysql_close ($Link); } }
View Replies !
Can't Get Php To Read Ini File.
My configuration is Apache/2.0.59 (Unix) mod_ssl/2.0.59 OpenSSL/0.9.7d PHP/5.0.4 on Solaris 10. phpinfo() lists the location of php.ini as /usr/local/apache/conf and my php.ini file is there but for some reason it does not appear to be being read by php. I have defined things such as upload_tmp_dir in that file yet even with restarting apache I am not seeing this reflected in phpinfo().
View Replies !
Read An Xml File Using Php
i am trying to read an xml file using php and i am stuck at a place, below are my xml tags, i have to retrieve the attributes of the parent and the corresponding tags Code:
View Replies !
Read/Write
I have an admin page that adds events into a .dat file on the server as plain text. Code: <?php //format incoming form data $content = $eventname."|".$eventdate."|".$eventabout."|".$url."|".$date."|".$author."|".$id."|".$email."|".""; //rewrite data file with new data //place newly submitted post at the beginning. $eventsfile = "../events/events.dat"; $handle = fopen("$eventsfile", "r"); $contents = fread ($handle, filesize ("$eventsfile")); fclose($handle); $handle = fopen("$eventsfile", "w"); fputs($handle, $content.$contents); fclose($handle);?> The effect is to read the data from the file, put the new data at the beginning and rewrite the file. So I guess my Questions are: 1) If more than one person submit the form at the same time is there any chance for data loss? Does php que file requests? 2) Is there a better way to accomplish the task 3) Any and all suggestions on improvement are appreciated.
View Replies !
Php Read A File
I am using the following to read the contents of a file. $Tp = fopen("./orders/T" . $oid , "r" ); This usually works, however the order directory is password protected making this code produce an error: --Warning: file("./orders/T1166964955") - No such file or directory in...-- Is there any way whicj I can supply the usernameassword to this code : $Tp = fopen("./orders/T" . $oid , "r" ); or will I have to have the file T1166964955 in a non-secure area.
View Replies !
|