Show When The Page Has Been Last Modified
1. I have php script that will show when the page has been last modified. How do I link it on my home page. The link that I am using now does not work. Here is the link:
<? include("updatepage.php"); ?>
2. I have a php forum. When I link it this way <a href="xxxxx/index.php"> it brings up the source code. When I link it this way <a href="xxxxxx/"> it brings up the dir. When I link it this way <a href="http://xxx/xxxxx/index.php"> it works. How do I get it to work with this linking <a href="xxxxxx/index.php">
View Complete Forum Thread with Replies
Related Forum Messages:
If Value =1 Direct To Page Otherwise Show Data On Page
In the member account area there is a button saying (list) when the member clicks this they are redirected to add.php here i am wanting to check if a members account is limited, if it is direct them to a page saying you must pay your bill. if its not display the info on the page. in the database there is a field called limited which is tiny in if its not limited the value of the field would be 0 if it is limited the value would be 1.
View Replies !
If Page = 'about' Show The About.html Page?
I wanted to do some kind of PHP script so that if the current page the viewer is trying to view is called index.php?page=about then it will use the php script to embed with an i-frame the about.html file into a cell in my web page's table. Basically, so that the whole page stays the same other than one cell of the table which is dynamic depending on the status of the index.php?page=whatever. Code:
View Replies !
Show Some And More On Next Page
I'm stuck making my log for login sessions show only 50 per page. The reason I need this is because it will only display about 250 items before not updating/displaying anymore. If anyone has a link to a tutorial, that would be super- couldnt find one via google.
View Replies !
Show 20 Results Per Page
i have created a database with some data in it and i want my page to read page and display the first 20 results and on the bottom to add numbers like [1] [2] [3] so the user can go to the next results.I figured that i can display the first 20 results by adding a counter on the while loop $num_rows = mysql_num_rows($result); $k=0;      while (($k<=20)&&($row = mysql_fetch_row($result))){ $k+=1; $i+=1;but i don't know how to display the numbers on the bottom.Here is my try <?php for($j=1;$j<=($num_rows/20);$j+=1){   echo "[".$j."]"; } ?> ...
View Replies !
Flash .swf Doesn't Show In PHP Page
I've recently put together a flash navigation for a 4 page site... three pages are HTML, the index page is PHP with a weblog. In all current Mac browsers, all four pages load fine. In Win IE 6 only the .shtml pages will load the flash--the .php page shows a big white box instead. If I include the index.php in the index.shtml file, the flash loads fine, but I'd like to know if there is some issue with PHP & flash that I should look out for... or is the issue with IE 6.
View Replies !
Show Image On Same Page
I echo a certain amount of images, these images are thumbnails. I want to be able to show the real enlarged image next to the thumbnail without having to reload the page. So what i'm thinking of is something like the onclick function in JS. I tried some stuff but still can't make it work. my code is something like this: for (i=0; i<count($test); i++){ echo "<a href="...."><img src="$test[$i]"></a>"; } tried putting a javascript function in there but wasn't successful. i basically need to pass just $i to another function and that function onclick() will produce the image.
View Replies !
Show Home Page On Log In
I want to have a homepage with a log in feature. But I want it to say 'You are not logged in" or "you are logged in" depending on whatever is the case. I know how to check db entries etc but should I have the php on the same page in order to position the welcome note ie: <?php echo "<p>Welcome $_SESSION(username), to my website</p>;?>
View Replies !
Show Page Depending On Request Url?
Is there any way to show a different page depending on the request url? I have a few domains that point to one IP address. What I want to do is if someone requests http://www.site1.co.uk they see site1.php or http://www.site2.co.uk they see site2.php etc all from the root directory? I do not have httpd.conf access Is this possible?
View Replies !
Show Number Of Visits On Each Page...
How should i do when I want to show number of visitor on each page where each page is describing a user details like this: http://localhost/user.php?user=1 on this page it show details about user 1. And for user_52 I want to show how many visitors this user have had: http://localhost/user.php?user=52 it will show number of visits
View Replies !
Show Error Message On Same Page
I have Index.php which contains the HTML form with a username and password field + submit button, action: is my check.php. Say for example the user only input's a username and miss out the password field; when he clicks the submit button. I want the same page to be refreshed with a error message appearing below the submit button saying "error, please fill all in". I can get this to display on another page. but want this to be on refereshed on the log-in page.
View Replies !
Show Page Break In Records
I've just started to learn php and sql, and I noticed that there are several php discussion groups here. Pardon me if this is the wrong group, and I hope my first question isn't too silly. :-) I'm building a website that will publish articles, so I have an article table which contains a heading field, an ingress field, and a body field which will hold the complete article. There are line shifts (or page breaks) in this field, but my display-page won't show them. How do I show the article with the page breaks?
View Replies !
How To Sho Video Clip On Web Page Also A Live Show On Web
Indeed I am using php and Mysql. My licent want to 1. Show a video clippings on the web site. What I need to do ? Please elaborate a n example will be great thing. 2. He also want me to show live telecast of a seminar What arrangement I ned to do From hardware point of view as well as Software point of view.
View Replies !
Page Load Time Show Really High
im running PHP 5.2 on IIS 6 (Windows 2003 Server) and im getting a weird load time result when trying to display page load times on each page. e.g. Page generated in 1193387528.5501 seconds. this is my current code: <?php $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $finish = $time; $total_time = round(($finish - $start), 4); echo '<p>Page generated in '.$total_time.' seconds.</p>'." "; ?> but i've tried 4 others which are all simular. Any idea as to why it's showing a false result as it's loading in unde 1 second (Dual Xeon 2.8 HT server and connecting over 100mb pipe (college campus)).
View Replies !
Get A Paragraph Of Text To Show On The Home Page Only
I am using a script that I purchased and downloaded. This script has a template folder and inside has header. php, and footer.php. The center content is populated from various other pages. How would I get a paragraph of text to show on the home page only, and no other pages in the script
View Replies !
How Do I Alter This Script To Show 5 Rows Per Page?
I'm very new to php/mysql and am having a few problems I would like to show five rows of data then have a link to next five / previous etc. I've included the script I have below. I would like to add I have found articles on how to do this, but my problems is i don't knowwhere I should be editing the below code. I have tried several examples but just keep getting errors. Code:
View Replies !
Str_replace - Add Some Content On The Page To Show What You Have Submitted?
I had this wacky idea to have a pull down that keeps the same values when previewing what they have select in the post (ie. Webmaster World's 'Preview' Button When you post It has the same value of what u put in it when you add some content on the page to show what you have submitted) My Code: $genre_pulldown = "<select name="genre" id="genre"><optgroup label="Genre"><option value="Yo Mama">Yo Mama</option><option value="Blonde">Blonde</option><option value="Political">Political</option><option value="Religious">Religious</option><option value="knock Knock Jokes">knock Knock Jokes</option></optgroup></select>"; if(!isset($_POST['genre'])){ echo $genre_pulldown; } else{ $genre_pulldown = str_replace('{$_POST['genre']}"', '{$_POST['genre']}" selected', '{$genre_pulldown}');//LINE 81 }
View Replies !
Problem With Include - Register Page Doesn't Show Up
I am trying to include a page, but for some reason it is not working. Here is my code: <?php if ($page=="") { echo "<center>Starbits Pets is currently upgrading to V2, so we will be down for a while, come back later!"; } elseif ($page=register") { include ("html/register.html"); } else { echo "That is not a valid location!"; } ?> The register page doesn't show up I have tried almost everything I can think of, and it still doesn't work.
View Replies !
Show The Current Time At The Resort On His Home Page.
I have a client who owns a resort in the Philippines. This client wants to show the current time at the resort on his home page. How would this be done with PHP? Is it some calculation based upon GMT? I think (I'll have to check) that the Philippines is +8 GMT...so is that what you'd have to do: create a snippet that grabs the current GMT and add "8" to it?
View Replies !
Showing Database Records As Links To A Page To Show Relevant Detail
What I currently have is list of players what I want to do is make each player a hyperlink to a page with their details on. The hyperlink would be like this www.mydomain.com/playerDetails.php?playerID=1 and it would display the player with playerID 1. I have seen this on lots of sites and would like to know how this is done, can anybody recommend me any tutorials or write me a short script to do this.
View Replies !
Using Last-Modified
I want to use Last-Modified in a php script, but it doesn't seem to work somehow. i use the following code where $FileDate is a formated date like: Sun, 06 Nov 1994 08:49:37 GMT (RFC 822, updated by RFC 1123) if($HTTP_IF_MODIFIED_SINCE==$FileDate) { header("Status: 404 Not Modified"); die(); } header("Last-modified: ".$FileDate); header("Content-type: ".$FileType); print $FileData; somehow the server doesn't send the header, or the browser doesn't sent the If-Modified-Since header. I know for a fact that $HTTP_IF_MODIFIED_SINCE is the right variable to compare with. I use apache under linux (and mysql), am i forgetting something or do i have to set something in my conf file ?
View Replies !
Last Modified
if there was a way to find out the last time a file was uploaded. So, let's say I have a Word file on my computer that was last modified 2 months ago. I need to upload said Word file using PHP and I need PHP to find out when it was last modified. If I try something like filemtime(),it tells me that it was last modified the exact second it was uploaded. Is there anyway to do this?
View Replies !
If-Modified-Since
Is there a HTTP-compliant implementation of If-Modified-Since-, If-Match, If-None-Match, If-Range and so on? I want my PHP-script to act exactly as if it was a static HTML-page delivered directly from Apache. I think this isn't easy to implement, especially if you take also weak and strong validators into account.
View Replies !
Last-modified
I tried putting this at the beginning of a PHP file: <?php echo "Last-modified: " . date( "F d Y.", getlastmod() ); print ""; ?> The goal was to ensure that the browser would realize that the page is newly produced HTML. However its not working. The browser shows above the page the expression.
View Replies !
Checkboxes - Show A Tick In The Boxes To Show That They Have Already Been Added.
I have been trying to learn checkboxes and arrays, and I've finally figured out how to add the checkboxes to the database. I currently have two forms addlinks.php and modifylinks.php and I have a dolinks.php that submits my data to the database. What I would like to do now is on my modifylinks page show a tick in the boxes to show that they have already been added. At the moment if I dont tick any boxes on modifylinks.php it deletes my previous data, and I have to retick them everytime I do an update. Code:
View Replies !
Getting The Last Modified Row In Mysql Db
Hello. I'm not sure if this should go in the MySQL forum but Oh well. Anyways I've got my webpage to display everything in my Databases table. I've use the following code-> <?php $linkID = @mysql_connect("localhost", "INSERT YOUR DB USERNAME HERE", "INSERT YOUR DB PASSWORD HERE"); mysql_select_db("INSERT YOUR DB NAME HERE", $linkID); $resultID = mysql_query("SELECT ibf_members.id, ibf_members.name, ibf_members.email FROM ibf_members", $linkID); print "<table border=1><TR><TH>ID</TH>"; print "<TH>Name</TH><TH>Last Name</TH></TR>"; while ($row = mysql_fetch_row($resultID)) { print "<TR>"; foreach ($row as $field) { print "<TD>$field</TD>"; } print "</TR>"; } print "</table>"; mysql_close($linkID); ?> But I want it to display the row that was modified last. I've searched through my php book and looked at all the commands it offers but I didn't find anything that would relate to what I want to happen. So I just want to know what the function is to display -- or at least dump the last modified row into a variable.
View Replies !
Another Last Modified Question
So a while back I started parsing .htm/.html files as php so I could include some php code snippets within my pages while appearing as static pages. With that I recently found that I no longer generate any cache headers. I did some research and found that I can include : <?php header("Last-Modified: " . gmdate("D, d M Y H:i:s", getlastmod()) . " GMT");?> at the top of every page. I then validate this with a header check tool online with a few pages I was testing on. While the last modified date does show now it NEVER returns a 304 which is the entire purpose of this. It is ALWAYS 200. Here is an example of my output from the test : #1 Server Response: http://www.foo.com/test.htm HTTP Status Code: HTTP/1.1 200 OK Date: Wed, 27 Dec 2006 07:24:39 GMT Server: Apache/1.3.36 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.2 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.27 OpenSSL/0.9.7a X-Powered-By: PHP/4.4.2 Last-Modified: Wed, 27 Dec 2006 07:15:07 GMT Connection: close Content-Type: text/html Now, shouldn't this be returning 304 to me after it has been cached locally on my machine? Second question - is it worth creating an etag along with this? What about some of the other cache controls out there? Basically, my only reason for this currently is to comply a little better and save some bandwith. My pages rarely change, but when they ARE updated I would like places like Google to know about it.
View Replies !
Modified Guestbook?
is it possible to modify a guestbook script so that i can post regular html codes ?? i want to use the guestbook approach because it has the power to allow only a defined number of posts per page, and automatically creates other pages from the remainders. also, it shows the latest post on top. << This is extremely important for me.
View Replies !
Modified Date
i need to get the modified date of a certain file in the directory this gives me the modified date of the file this code is in. to see what this code does you can look at this page it gives me a expiration date of my online photo galleries. Code:
View Replies !
A File Was Modified
I know how to read a directory and list the files that are in it. Is there a way to tell when each file I find was last modified? PHP Code: $dir = "path/to/my/directory/folder"; if ($handle = opendir($dir)) { ///// This is the correct way to loop over the directory. while (false !== ($file = readdir($handle))) { $myFiles[] = $file; echo "<p>$file</p>"; } }
View Replies !
Last Modified Database
How to use php to get a last modified date and time from the database. I want my footer to have a "Last Updated: 0/0/0000" using the database motified date.
View Replies !
Topics/last Modified
I'll have a play around with some code later, if I can think of something, but I was just wondering if anyone's done this already or knows a way. I'd like a list of 'hot topics' on my page it would be a list of recently viewed pages in the site. I expect it would have something to do with Last Modified getlastmod() but I can't think beyond that at the mo.
View Replies !
Get The TIME A File Was Modified ??
1st step - I can get the "current time" - $tr=time(); echo "TIME = $tr<BR>"; RESULT "TIME = 1135860780" OK... I CAN get the last time a file was last modified :- echo "FILe - '$file'<BR>"; if (file_exists($file)) { $ta=date ("F d Y H:i:s.", filemtime($file)); echo "The file was last modified: $ta<BR>"; } RESULT = "The file was last modified: July 30 2005 03:05:20." However - My problem.... i am having a problem - Converting the time shown above - into a UNIX timestamp... $taw = date('d/m/Y H:i:s', $ta) ; echo "Time Modified = '$taw'<BR>"; $taw=strtotime('$ta'); echo "Time Modified = '$taw'<BR>"; $taw=strtotime($ta); echo "Time Modified = '$taw'<BR>"; But the result I get is :-
View Replies !
If-modified-since HTTP Compliant!
is there a HTTP-compliant implementation of If-Modified-Since-, If-Match, If-None-Match, If-Range and so on? I want my PHP-script to act exactly as if it was a static HTML-page delivered directly from Apache. I think this isn't easy to implement, especially if you take also weak and strong validators into account.
View Replies !
Compile Certain .php Pages So They Cannot Be Modified
I have started building a php mysql internal application which I may like on sell some day. I was wondering if it was possilbe to compile certain .php pages so they cannot be modified, kinda like what you can do with other languages such as java and c when you compile the code.
View Replies !
Header Last Modified Time
For some reason, when you view the http header info for my .php pages, it does not show a last modified date and time. So, thinking that I could create one, I tried this: <?php header("Last-Modified: ".filectime($_SERVER['PHP_SELF']); ?> but it doesn't work. Does anyone know how to do what I am trying to do?
View Replies !
Get File Last Modified Time Of URL
does anyone have a good trick to get the last file modified time of an external file or image. as you konw filemtime does not work (i have php 4.*) on most of the urls. can I get this information some other way?
View Replies !
Not Modified" Responce
The standard says "The 304 response MUST NOT contain a message-body, and thus is always terminated by the first empty line after the header fields" http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html PHP script I do the time calculations and then I simply do: header('HTTP/1.1 304 Not Modified') exit ; But when I retrieve the responce as raw text I see that the responce does have a body. It is just 8 bytes of binary data and I dont know how to prevent that from being sent after the headers.
View Replies !
Hyperlink Modified Dynamically
I want a Hyperlink that modifies dynamically the target after every click. The link text/gif should be permanent, but the link target should be taken from a dynamic file/table in the server, and modified following every click by any user.
View Replies !
|