How To Get .html/.htm Extensions Read As .php
I have a site with a lot of preexsisiting links/pages that are of the .htm, .html extension but they need my basic php functions added to them. Anyone know how i can get them read as .php without having to rename every page and link?
View Complete Forum Thread with Replies
Related Forum Messages:
I Want To Use PHP Includes, But I Want .html File Extensions.
I'm an HTML guy with very little knowledge of anything programming related. However, I want to use PHP includes on a site I'm currently working on, because I want to be able to make site-wide updates often. So, with the little bit of PHP learning I've done, I got includes to work just fine and it's all perfect for what I need it for. The only problem is, all of the pages have to be whatever.php and whatever2.php in order for it to work. Thing is, I'd prefer if all of the pages on this site were whatever.html and whatever2.html. So my question is, is something like this possible, and, if so, how can I make it happen?
View Replies !
WinXP/IIS Set Up For PHP To Parse .html Extensions
I just installed PHP (4.3.3) on a WinXP (SP1) system using IIS (5.1) as the web server. I am using FrontPage 2002 and would like to be able to debug my PHP scripts locally. Since FP does not handle the .php extension as a web page (edit, display, navigation, etc.), I am trying to set it up to parse files with the .html extension. I have added the .php and .html extensions to the Application Configuration page of IIS and I have also applied some regedit changes suggested by the documentation. All to no avail. The .php extension works, the .html does not.
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 !
Where Are The Extensions?
I've built PHP 5 on Solaris, and included --with-pgsql=<dirwhen i configured it. my test script seems to work, but extension_dir is pointing to an odd place (a directory that does not exist, in fact). I never made a php.ini file, so I assume it's getting set to some default. My question is, did the compile process actually make a php_pgsql.so file? or is support bundled into the executable?
View Replies !
Dll Extensions
I installed php 5.2.2 on my windows machine and apache 2.2.4. after a first configuration apache worked with php. then i installed mysql 5.0 to be able to run a cms on my machine. after some configuration tries php stopped working. apache log (the same of php.exe output) says: [Fri May 18 11:15:00 2007] [notice] Apache/2.2.4 (Win32) PHP/5.2.2 configured -- resuming normal operations [Fri May 18 11:15:00 2007] [notice] Server built: Jan 9 2007 23:17:20 [Fri May 18 11:15:00 2007] [notice] Parent: Created child process 2516 PHP Warning: PHP Startup: Unable to load dynamic library 'C:Program FilesPHPextphp_fdf.dll' - The specified module could not be found.are in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:Program FilesPHPextphp_interbase.dll' - The specified module could not be found.are in Unknown on line 0 Code:
View Replies !
Getting Rid Of Extensions In URL
This is probably a stupid question, but does anyone know of a way to get rid of the ".html" or ".php" extension from the URL. Example URL www.mysite.com/page1.html Ideal URL www.mysite.com/page1 I know if you make a folder like so -- www.mysite.com/page1/ I guess thats one way...however is there a way to get rid of the slash as well?
View Replies !
PHP Extensions
i tried un commenting the extensions in my php.ini file and it causes any page i try to visit to load for like 40sec and then return a page cannot be display or simply go back to the previous page and not allow anything to be accessed. Anyways what im ultimately trying to do is get php functioning with all the most common extensions. Also i am in need of using ADODB this also by itself when un commented in the php.ini causes pages not to load. My server is a Windows 2003 Standard Edition with IIS 6, PHP 4.3.11, and Plesk.
View Replies !
Extensions
I'm currently looking for all the PHP Extensions for Windows in a pre-packed zipped file or something to that effect.. hoping this includes MySQL and GD libary
View Replies !
Extensions Arrays
ok I have got variables (here is a example of then):- $type1 = ".jpg"; $type2= ".doc"; $type3 = ""; $type4 = ""; $type5 = ""; up to 10 different types. Here is the problem how would I get the files of those types to b displayed on the screen. As at different times there might b more or less extensions on the screen. Here is some of the coding of which I am planning that I am planning to adopt/change, but I can not work out how 2 get the different types 2 be checked.
View Replies !
Does PHP Load All The Extensions In The PHP.INI..
I am using Windows IIS with PHP5 CGI. When I want to use an extension in PHP5 under Windows I enable the extension line in PHP.INI. (e.g. extension=php_sqlite.dll). Does PHP load all the extensions in the PHP.INI on every invocation of a request? If I have 20 different extensions not all of them are used on every page request. Is this inefficient? Would using dl() be more efficient? And why is it being depracated under 5?
View Replies !
PHP Extensions Win32
I'm trying to get some different extensions loaded and no matter what extension I try it always comes up with an error saying it could not find the module. Even though the pathname is correct. I have php loaded in c:php4 and the extensions c:php4extensions ; Directory in which the loadable extensions (modules) reside. extension_dir = "C:/php4/extenstions/" Here are the two changes I've made, Code:
View Replies !
Getting XML Extensions To Work
I am running PHP v4.3.1 on Apache 1.3.27 on Mandrake 9.1 (kernal 2.4.21- 0.13mdk) I tried running the phpSysInfo script ( http://phpsysinfo.sf.net/ ) and gave me the error "Call to undefined function: xml_parser_create() " And that is supposed to be a function used by the XML extension. I checked my php info ( http://svr2.vrillusions.com/info.php ) and there is no XML secion. I checked the XML section of the manual ( http://www.php.net/manual/en/ref.xml.php ) and said I needed to install expat. There was a precompiled RPM for mandrake so I got that installed, restarted apache and it still doesn't work. It seems like I would have to tell php somehow that I have XML now, but can't figure out how to do that. Any ideas?
View Replies !
Installing Gd Extensions On The IIS 5
I have downloaded the required gd extension file. i don't know how to install these extensions. i have followed the Process which is given in the documentation of these extension. but it is not working and generated errors. any body tell my the installation proccess of the gd extension.
View Replies !
Extensions And Serializer
I have created an extension in PHP. It implements a new serializer for the session manager. Unfortunately, the session extension is initialized first, and fails to see my extension.
View Replies !
CPDF Lib Extensions
I facing some problems with cpdf extension. I have done some PDF generation in the php application running on Windows/Apache Platform using php4.06. it runs fine. Now that I need to port the application over to Linux Redhat 7 platform. As i'm not very familiar with Linux, I face the problem of compiling and installing the cpdf.so extension. Can any experts show me the steps or tell me where to get the cpdf.so extension for php4.
View Replies !
Documenting PHP Extensions.
I've been developing a PHP extension and used ext_skel to generate the stubs for each function that I coded. At the begin of a function there is some meta information about the arguments and the return value. I would like to use that meta information to generate a document about the extension, in order to describe it to the users. Is there any tool out there able to help my in this task?
View Replies !
Problem Of Php Extensions
i want to make my php extensions work. first i run the ext_skel to create a new module named myext. ok ,the i have the mycxt dir, then i modifide the m4 file and ./phpize, make ,make install it all works fine but when i test the module by runining "php myext.php" it returns this: X-Powered-By: PHP/4.2.2 Content-type: text/html <br /> <b>Warning</b>: Unable to load dynamic library '/usr/lib/php4/myext.PHP_SHLIB_SUFFIX' - /usr/lib/php4/myext.PHP_SHLIB_SUFFIX: cannot open shared object file: No such file or directory in <b>/home/backup/php-4.3.4/ext/myext/myext.php</bon line <b>3</b><br /> PHP_SHLIB_SUFFIXFunctions available in the test extension:<br> <br /> <b>Warning</b>: Invalid argument supplied for foreach() in <b>/home/backup/php-4.3.4/ext/myext/myext.php</bon line <b>9</b><br /> <br> Module myext is not compiled into PHP
View Replies !
Printer Extensions
I was wondering if anyone could tell me how to install/find the printer extensions for PHP. I just installed PHP 4.1.1 on Windows 2K, and I am feeling a bit clueless at this point.
View Replies !
Php Extensions With Cygwin
Has anybody managed to build a Php Extension (Loadable Module) under Cygwin. I tried to build the example first_module found on Under windows with Apache 2.0.48, I managed to compile it using cygwin compiler but I have the following message : Warning: dl(): Unable to load dynamic library 'c:phpextensionsfirst_module.dll' I only found tutorials using Visual Studio so any experience feedback about a similar problem would prove to be very usefull.
View Replies !
Masking Extensions
I've created a script that dynamically generates an image. It is a php file that can be called inside of an image tag. The site that it will be used on mainly does not display images with php extensions. Is there any way I could give it a jpg extension and my server still process it as jpg? See the image below as an example. The site is somehow setup to where the image will change dynamically based on what the filename is. I really need to do it this way, any ideas?
View Replies !
Page Extensions....
I've been looking over some code and notice many use the following format (when doing and include) pagename.inc.php What effect does .inc have on a page that is included versus including a page without it? What am I missing? I did some search on web page extensions via google and couldn't find anything describing this.
View Replies !
Dom And Sqlite Extensions
i'm trying to use the dom extension in PHP5 to read an xml file <?php $stuff = new DomDocument(Ƈ.0'); $stuff->load('library.xml'); ... the code fails in the second line saying that it can't instantiate the object. i think my php isn't finding the library that contains the DomDocument class. i'm having a similar problem running $handle = sqlite_open($db); where it says that the sqlite_open() function is undefined. i'm running mac osx 10.3.9 and installed php5 this morning and it works fine until i try calling any of the functions or classes in these extensions. i thought that the dom and sqlite extensions were automatically included in php5 and i checked phpinfo() in which both dom and sqlite seem to be enabled.
View Replies !
Installing Extensions For PHP
I use PHP on a windows xp machine and have problem installing PHP extensions. How can i install php extensions on windows xp. I use apache 2.x. I am particularly interested in installing php_domxml.dll.
View Replies !
Mysqli Extensions
I am currently reading the Zend Certification book. It talks about functions starting with a &. But, I dont quite understand what it means. When do you put a & at the front of a function? The example it gives is: function &query($sql) { $result = mysql_query($sql); return $result; } // The following is incorrect and will cause PHP to emit a notice when called. function &getHello() { return "Hello World"; } // This will also cause the warning to be issued when called function &test() { echo ’This is a test’; }
View Replies !
No File Extensions
My site runs completely from a MySQL database. I have a file with universal code that is included into each section of my Web site. Each section is represented by an extensionless file which allows me to have URLs like this: mysite.com/section/page, where section is the actual page (it looks like a subdirectory). This used to work, but my host recently started using phpsuexec which gives me a 500 error when I try to view mysite.com/section. There are no CHMOD problems (I have read extensively on phpsuexec). All my directories are stricter than 755 and all my PHP files are 400 or 600. I just need some way to set extensionless files to PHP without using ForceType or DefaultType in my .htaccess, or some way to make the .htaccess stuff work.
View Replies !
PDO Extensions For Windows
Does anyone know if there is a php_pdo_mysql.dll available that supports mySQL version 5.0.26? I am trying to get my head around Zend Framework by working through a tutorial. It requires PDO support and the native php_pdo_mysql.dll only supports mySQL versions 3.x/4.x. I will downgrade mySQL if I have to but i'd rather not.
View Replies !
Find Dll Extensions
I installed php 5.2.2 on my windows machine and apache 2.2.4. after a first configuration apache worked with php. then i installed mysql 5.0 to be able to run a cms on my machine. after some configuration tries php stopped working. apache log (the same of php.exe output) says: Code:
View Replies !
Using File_exists For Different Extensions...
So I've got this code that forces a download when a user clicks a link. It basically looks at all the variables passed, knows which folder to look in, and sends the file to the browser. Easy. Until I realized that for certain files, I have some that end in .zip and some that end in .sit (stuffit). Right now it only checks for .zip files, and basically I need my function to output the proper response if either the .sit or the .zip file is there... The premise behind the function is to check to see if a file is there, and if so, it displays a link to download the file - otherwise it says simply, "Not Available".. Code:
View Replies !
PHP And Extensions Using WAMP
My hosting company just told me that in order for me to use php on their server I need to have the .php4 extension in all my php scripts, and otherwise php won't work. I have been using WAMP for a few weeks and it only seems to work with .PHP extension files, I am sure there's a way to make it work with .php4 extensions as well, just need to know how.
View Replies !
Loading Extensions With IIS
Whenever I try to load ANY extension by uncommenting it I get PHP Startup: Unable to load dynamic library 'C:phpextphp_extension.dll' - Access is denied. This isn't the common "php_mysql.dll" problem because I got that working with Apache fine (I'm migrating to IIS), but this won't work with ANY extension...
View Replies !
Mysql Extensions In Php.ini
I'm working on Ubuntu 5.04 operating system. Yesterday I installed PHP 5.0 from package and some modules (php5.0-mysql). I have installed MySQL 4.1 server and client. But when I'm trying to connect with MySQL, I see error, that php5.0-mysql is not installed. But it's installed, I'm sure! Result of phpinfo() is that PHP don't see MySQL extension. I have all extension files (500mysql.ini, mysql.so) in "good" places. Can I add mysql extension manually, by php.ini file?
View Replies !
Installing Extensions
im trying to get php_pdf.dll working so i can use it to generate pdf's i've placed it in the ext folder and uncommented extension=php_pdf.dll in the php.ini file. but wen i run this script : Code:
View Replies !
Install Any Extensions
My system environment is PHP 4.3.8 Web server Apache/2.0.52 (Win32) mod_ssl/2.0.52 OpenSSL/0.9.7e I was trying to enable curl extension by uncomment php_curl.dll in php.ini. But right after I uncommented php_curl.dll, I couldn’t load any PHP pages. It looked it is loading from the status bar. But eventually I got nothing loaded. I also happened to find out that this happens when I uncomment any extension (dlls). There was another person who had the same issue. http://bugs.php.net/bug.php?id=30521&edit=1. But in the reply, it says this problem does not imply a bug in PHP itself.
View Replies !
|