Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





IE Ask To Open The (php) Page As File


I just uploaded a new website onto a new server. On this server however, when you click on the only 2 php pages. IE will ask to open the page as file. Is there a simple way to fix this, or is it simply the new server that can't support php? The two pages are just a simple email form.




View Complete Forum Thread with Replies

Related Forum Messages:
Text File To Popup Or Open In A New Page
I have a form which takes user input. On submit, the form will run a
php script that will create a new text file using the user input.

I want this text file to popup or open in a new page. The problem is
that when the page opens it still shows the old text file, i need to
hit refresh for it to show the last user input.

the html file (greatly simplified):
<html><head>
<title>Untitled</title>
</head>
<body>
<form action="action.php" method="post">
<p>Title: <input type="text" name="Title" /></p>
<p><input type="submit" /></p>
</form>
</body>
</html>

The php file (simplified as well):
<?php

$spot_code = $_POST['Title'];

// Open the file and erase the contents if any
$fp = fopen("myfile.3dml", "w");

fwrite($fp, "<TITLE NAME=" . '"'. $spot_code .'"'. " />
");

fclose($fp);

//redirect
header( 'Location: http://localhost/mytest/myfile.html' );

?>

the text file, myfile.3dml is embedded in myfile.html (it requires a
plugin to view - it's a 3D world). When myfile.html is opened it
displays myfile.3dml but it needs to be refreshed to show the current
input.

View Replies !
Script To Open A Small Page When Loading A Large Page?
the idea is a script that loads when a large page is trying to open that need for example 5-6 mins to load and in the mean time to open a very small page that is saying loading the page please wait and when the large page is loaded to go directly to that page. Do u get my idea?

View Replies !
How To Open Page
I want to send the browser to a differnet page how do i do this with php? it's an if statment

if true send to example1.com else send to example2.com.

View Replies !
Open A New Page?
I have a small problem, this is my current script:

{$_SESSION['login'] = $_POST['login'];
$login='You are now logged in <b>' . $_SESSION['login'];}
else{
$login= 'Wrong user name or password.';}

If the user name or password is incorrect, it will just display Wrong user name or password. But what I want it to do is have the browser open a new page if it is incorrect, for example incorrect.php. Which will then display an incorrect user name or password message. This shouldn't be too complicated, I just have no idea how to go about it.

View Replies !
File Download Problem - Change A Binary File Into A Text And Open It In A Browser
I have uploaded files to mysql (doc and xls) using the tutorial. The problem comes when I try to download. Again I followed instructions in the tutorial. When I click on the link to download the file, it formats it as text and sends it to the browser instead of seeing it as binary and offering me a download box. PHP Code:

<?
if(isset($_GET['id']))
{
    include 'includes/configdb.php'
    include 'includes/opendb.php'

    $id      = $_GET['id'];
    $query   = "SELECT name, type, size, content FROM upload WHERE id = '$id'";
    $result  = mysql_query($query) or die('Error, query failed');
    list($name, $type, $size, $content) = mysql_fetch_array($result);

    header("Content-Disposition: attachment; filename=$name");
    header("Content-length: $size"); ....

View Replies !
On If Statement Open .htm Page?
how to open a preset page from an if statement, such as:

if ($row["password"]==$password ) {
printf("Successfully Logged In!");
}else{
print("Login failed!");}

where instead of just printing the text string it opens a new page!!

View Replies !
Open A Page In Grayscale On Mac...
I've having a serious issue that I need your help with as soon as humanly possible.  I have a page that has some products on it, when the product is clicked, it opens up the printable version along with the print dialog box for printing. My problem is, I need the page to open up in grayscale. It's working in IE, but it's not working in Fire Fox, and it's not working on Mac. 

View Replies !
Orig. Page Open
Usually when I use header it just replaces the current page, but now with this code it opens a new tab in firefox and puts in the page there, leaving the original page in the original tab. What can be the cause of that? code:

if ($_REQUEST['returnitems']) {
header("Location: http://" . getenv(HTTP_HOST) . "/index.php?section=admin&action=returns"); }

View Replies !
Open Page In Frame
i would like to open a page always inside a frame. This can be achiieved with a simple javascript

<SCRIPT LANGUAGE="JavaScript">
<!--
if (self == top) {
location.replace("index.htm");
}
// -->
</SCRIPT>

However this can cause a popup depending on the user's browser settings

View Replies !
Can't New Page To Open Using Button
Here is the code I have. Does anyone see anything wrong with it? It won't go to the url when clicked. Code:

View Replies !
Open Feedback Page
i am trying to open feedback page after a user visiting a particular site( that means when a particular user close all pages after see the ste and at last i want to open the feed back page).

View Replies !
Open File, Put First 5 Lines Into A Variable, Close File...
1) I want to open a file on my server.
2) I want to read only the first 5 lines.
3) Put the first five lines into a variable.
4) Close the file.
5) Display the contents of the variable.

I know how to use the fopen() but I have big problems just trying to read the first 5 lines only? I tried many things. I downloaded some search scripts which displayed the <meta> tag only from html pages...

What is this guy doing?

Well I have a big site and content is added and changed everyday. I have a dynamic page that reads a directory for files and then puts a link (well it includes the file for reading on my php page). That works great! MY PROBLEM is that I want not only a link but a small description below it (basically the first five lines on the file)...

See so far:
Quote: if (isset ($content)) {
include ("files/$content.html");
echo "<p><A HREF="read.php"><b>Back to index</b></A>";
} else {
echo "<b>Opening directory, reading files, and listing them as a link</b><p>";
$handle = opendir('./files');
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
echo eregi_replace (".html", "", "<A HREF="read.php?content=$file">$file</a><p>");
}
}
closedir($handle);
}

View Replies !
Open .php File With PHP Designer 2007 By Clicking The File In XP
In windows XP, I want to be able to click on a .php file and have it
opened in PHP Designer 2007,
Or right-click on it and have an "edit" menu option presented to me.
I know how to tweak the registry to do this in general, but what would
the command line look like in this specific case ?
PHP Designer does not do this automatically. It is as if the program
does not allow commandline options.
It only opens with the last file used or a menu of recently opened
files.

View Replies !
PHP File Handling Open A Simple Text File
I am trying to open a simple text file using php, read the content in , close the file and display the content to a page. I can't seem to get this code to work. When i run the page i get no errors but and the "this doesn't work" string at the bottom prints out ok. I have tried putting the 'PHPdata.txt' section in as a url ie 'http://localhost/phpdata.txt' but this doesn't seem to work either.

I am using windows xp and apache. I am trying to firstly get this code to work with the aim of opening and pulling back the html content from a remote page to mess around with on my server. Code:

View Replies !
Open And Process Remote Page
I want to be able to ask users for a URL, open that page, change some of the
contents and then display that page as if they had typed the URL into a
browser. I have toyed with some of the php functions for opening URLs, but
what I am not clear on is how much work my script will have to do (do I need
to fully emulate a browser, for example).

The net effect I am after is very similar to the page translation feature
that Google offers. Does anyone have any examples of this kind of technique.
Any ideas how much work is involved? (My 'translation' is pretty trivial, so
really it is mostly a question of how much work to display the remote page).

View Replies !
Open A Page Using The Function Fsockopen()
I try to open a page using the function fsockopen(), however I the following output appears: "HTTP/1.1 302 Moved Temporarily". How can I get past this?

View Replies !
Shortest Code To Open A Web Page From PHP
I have Windows Vista and PHP with Curl.I would save a web page on my harddisk with a PHP command-line command. What's the more minimalist way to do it?

View Replies !
Open Link In Included Page
How to include Link that could open in same page rather than going to another page


for example, if i include a file in home.php

 <? include("/index.php") ?> and I want to open up the LINKS in  "index.php"

in same home.php.

example   - open    "/index.php?p=Hits"  on same home.php page

I know i could have FRAMES but i dont want to frames in my site

View Replies !
How To Get Rec Id And Use Header() To Open New Page And Pass Rec Id
1. After the record is inserted I would like to open page_add.php and pass the record id (there is an auto_increment field in the table called ID) to the new page "page_add.php". I was thinking of using header() to open the new page and passing the id as parameter (i.e. page_add.php?rec_id=what ever) is there a better way to do this?

2. how would I get the record id after I store the new record?

3. Also not sure how to write header() with a variable in it?

Code:

View Replies !
Web Page Open Up Automatically Using An If-statement
I was wondering if there was a way to have a web page open up automatically using an if-statement, either as a pop-up or just going to the page in the current browser window?

View Replies !
How To Open Random Flash Page Using Hyperlink?
I'm new to using PHP so please bear with me.

I'm trying to create a hyperlink that will open a random Flash page so that users will see a different flash module each time. Here is some of the code that I wrote but I'm not sure if it'll work since I'm not very good at coding. Oh yeah, I'm not using a database either.

// random_menu.html
<head>
<?php
$i = rand(0,3);
?>
</head>
<body>
<a href = "www.x.com/random.php?i=$i">x</a>
</body>
---------------------------
// random.php
<head>
<?php
$i = $_post["i"];
if ($i = = 0){
$value = "a";
}
else if ($i = = 1){
$value = "b";
}
...etc.
</head>
<body>
<object>
<param name="movie" value="$value">
<embed src="$value"></embed>
</object>
</body>

Please help if you know how to do this.

View Replies !
Reading A File - Open A File Just Copied
For some reason I can open a file, but I can't read it (I checked with is_readable() and is_writeable() and both returned true). I'm trying to open a file just copied, so maybe that's the reason why I can't read it, and I would have to reload the page. PHP Code:

View Replies !
File Upload Cannot Open The File It May Be Corrupted
I'm really stuck with the file upload. I submitted similar code a while ago in MSSQL section , but didnt get any reply at all so i've change the code but am still having problems. Some one please help.

I'm running PHP 4.4, IIS 5.1 and mssql

Ok, i'm uploading a PDF file to a directory, the upload works fine but when I download the file I get an eror "cannot open the file it may be corrupted". It really bugging me, I cannot figure out why its not working. the PDF files that I upload are fine but when I upload it I cant open them again. Code:

View Replies !
Search Script - Open A New Page Showing All Fields
let's say i have 3 fields : name , sirname , age.name is primary.i need to click on the result ,for example : george , and open a new page showing all fields.for example george lucas 35.Any ideas? Code:

View Replies !
Setup A Page When You Open A Drop Down Menu Of Options
How do I setup a page when you open a drop down menu of options, select an option and then an image on the page changes to the selection you landed on. Code:

View Replies !
How To Open Page And Make Sure Users Sees The Right Information
I'm making a website where registered users can upload a photo as well as information. The main page will display all of the users' photos. When user1 clicks on, say, user5's photo i want a page to open up and user5's information to be displayed. Is there a way to do this? Code:

View Replies !
How Can I Open A Source Of A Page (.html, Javascript ) In A Textarea
I need to find out how can I open a source of a page (.html, javascript ) in a textarea, edit the page and then submit it back to the server.

View Replies !
Open Popup Window When Page Is Loaded If A Field Is Populated
Would it be possible to open a popup window on loading the instruction page but only when the critical information section of the page contains text?

The popup window could either contain the contents of the critical information section or just a visual warning that such information exists on the main page.

I have a pretty good knowledge of VBA but sadly my knowledge of php and javascript is very limited.

View Replies !
Set The HTTPS Username And Password Using Php/flash And Then Open The Secure Page.
My hosts allow secure https logins on specific directories. What I want to do is have a login screen in flash, if the user enters the correct username and password I would like to set the HTTPS username and password using php/flash and then open the secure page.

In my mind at this point they'll be logged in and then can navigate the secure page without seeing the browsers https login dialog. Am I kidding myself, or is this possible?

They're config is the following:
PHP Version 4.3.11
4.9-STABLE FreeBSD
Zend Engine v1.3.0

Apache/1.3.33 (Unix) PHP/4.3.11 mod_ssl/2.8.22 OpenSSL/0.9.7c
FrontPage/5.0.2.2635 mod_throttle/3.1.2

View Replies !
Page To Open In The Webshops Main Frame Instead Of Opening In A New Window.
When the user register himself for a newsletter at my webshop the webshop sends out an email with an activationkey. When the user clicks the activationkey in the email I want the page to open in the webshops main frame instead of opening in a new window. Is this possible?

View Replies !
File > Open
I need to open a file called news.txt, copy all of it's contents into a $string then write $string2 to news.txt then add $string to the file, example:

contents of news.txt:
Hello today
How are you
Top of the morning.

I want to add the line 'Goodbye' before Hello today in the news .txt file.

View Replies !
How To Open A File
I want to open a file which are situated on server see in c or d
and I know the file how can i use php to open particular file and copy
paste in my computer or user's computer.

View Replies !
How Can I Open A Pdf File?
I need to write a simple PHP code that has a text link. When a user clicks the text link, a pdf file should open inside the browser. One of the requirments is that a url should not change.

So, for example, you start with index.php. When you click the text link and open a pdf file, a url should remains the same, which is index.php. I have an idea of using a POST parameter, but I do not know exactly how I can achieve this.

View Replies !
Open A Php File
I want to open a php file and find myself redirected on
another.

a simple example of what I'd like to do.

file1.php_______________________

<?php

header(Location: http://127.0.0.1/file2.php);

?>

file2.php_________________

<?php

echo "you are in file 2";

?>

it doesn't work! maybe I am not using the proper function...

what can I do?

View Replies !
Cannot Open File
Not sure where area I have messed up the php codes? I have put the newvideonettable.htm in the Macintosh HD://Applications/MAMP/htdocs/lessons/, when I called it that shows me Can not open this file! Code:

View Replies !
To Open A Zip File!!!
How to open a zip file and read its contents?

View Replies !
Open A New File
I am trying to open a new file, but it give me the following massage, Warning: fopen(testFile.php) [function.fopen]: failed to open stream: Permission denied in index.php on line 3.

<?php
$ourFileName = "testFile.php";
$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");
fclose($ourFileHandle);
?>

View Replies !
I Need To Open A File
I need to execute the local c drive files using php. I mean to say if we are having one exe file in local drive but i need to execute it using PHP which is running in IIS of other mechine..

View Replies !
Open A File That's Saved As A .php File
I don't get it, I just simply open a file that's saved as a .php file

http://vcob.org/blank.php

with the following code in it: Code:

<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">

</BODY>
</HTML>

View Replies !
How To Open A File That Uses Unicode
Does anyone know how to handle files that use unicode as encoding.

If i want to open a file a get something like this ...

-original-
"This is an example"
-output-
" T h i s i s a n e x a m p l e "

So it puts extra spaces between every character ...

this is the syntax i use:

View Replies !
How To Open A File For Reading ?
i want to open a text file for reading. i tried this but nothing comes out ?

$fp = fopen("/u/htdocs/privat3/ttt/test.txt", "r");
fputs($fp, "GET ".$url." HTTP/1.0 r ");

View Replies !
Open External File
Is it possible (how?) to open a file that is located on another server? I need to open the file so that I get the HTML code (so that I can parse information form it).

View Replies !
File Download NOT Open
I have a php page that reads files links from a Database.
This works well, but when we click on the link the file starts to open.

Is there anyway to force the file to SAVE not open ?


View Replies !
Can I Open The First 1kb Of A File Then Stop?
I need to validate over 100 sites with a simple script. Making sure that a file exsists is not enough-- I have to get the header information. The code below only works if I am validating a few pages (less than 15) Any more and it times out. PHP Code:

View Replies !
Open And Add New File To Zip Archive
I want to open an existing zip archive and add mor efiles to it on the fly
using php.
Can someone point to some resource to do that ?
I have looked at the Zend article about creating zip files on the fly but
that does not allow me to add files to an existing zip file.

View Replies !
Open A File With A Proxy
can you tell me if it is possible to open a file behind a proxy ?

View Replies !
Open File And Get Contents
I need to open a file and then echo the contents into a text area. I tried file_get_contents(), but it doesn't work, it isn't recognised as a function..

Any other way of doing this?

View Replies !
Open Excel File In PHP
How to open Excel worksheet in browser.

View Replies !
How To Open An Excel File Through PHP
I am writing a script to automate a reporting process. One of my steps (the last step i need to figure out) is openening an Excel document through the script. When i manually open it and i see it on the screen, it works fine - that is... it does the data connects and runs the macro's. Code:

View Replies !
Cant Open Url File Using Fopen()
i cant open url file using fopen() eventhough i set allow_url_open to on.

View Replies !
How To Open And Count A PDF File
I want to open different PDF Files while counting the opening process.

I would like send an email, once a specific PDF opens. (Simple.) I do have the problem though that I don't seem to get it opened:

The help-file might be opened with an URL like redirect.php?id=123456

<?php .........

View Replies !
I Open A .sql File In Access
i have seen many converters on the internet to convert mysql databases to work in access, but you have to connect to the server. i don't have a server to connect to anymore, and therefore no database to connect to. Is there a program that i can use to convert my .sql file which i have on my computer so that i can open it in access.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved