Directory List And Linking
I found on the forum how to list and even sort a directory listing. Now I want to clean it up... but want to make it list as a link the article name, author and postdate. When I click on it it should pass the variable with the article name to a another page. Here is the code. Code:
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Linking To All Files In A Directory
I'm trying to do is set up a directory that will contain a bunch of different web pages and have any web page in that one directory linked on the nav.php automatically. Lets say I have 3 files in my stuff/ directory, named file1.php, file2.php and file3.php. In the nav.php I want a script that will generate this html for every page <a href="/stuff/$file">$name</a> where $file is the file name in the directory, and $name is a variable defined within the file its self.
How To List A Directory
I would like to get a list of a local directory content using php. I would be very appreciative if anybody could tell me how to do that. I loocked in the php manual but coulsn't find anything (probably I just missed it).
Directory List By Date
Hi, can someone show me how to print a list of directories and the dates they were created, sorted from newest to oldest? I found the readdir() function, but don't know where to go from there.
List Php Files In Directory.
I am creating a plugins folder that I will use to store php files. I also store other folders within that "plugins" folder. The problem I have is getting the script to read only the the .php files and skip subfolders. Plugins[main folder] ->plugin1.php ->plugin2.php ->screenshot[folder] ->downloads[folder] How to keep the script from checking the folders (screenshots, downloads..) This part of my script filters the main folder and parent but not subfolders if ($file!= "." && $file!= "..") { How do i get that code to not check subfolders.
List Files In Directory Excluding Directories
I have the following code which I require to get the list of files in a given directory. However in that given directory I have other directories as well. I thought the second if condition was taking care of excluding the directories, but its not. I get a bunch of directories listed along with the files. PHP Code:
Remove File Extensions From A Directory List
I'm running a small script which lists files in a directory by last modified and with under scores in file names replaced with spaces. I'd also like to remove the file extension, but cant figure out how. I found this code. $ext = substr($value, -4); ....though i'm unsure how to implement it PHP Code:
Create PHP Pages From List Of Files In Directory
this is probably easy for a php pro... but I cant figure it out.. I have a directory of mp3 files named like this. Chevy_Car_Commercial.mp3 There are about 150 files. I am trying to find a script that will make php pages based on the file names. chevy_car_commercial.php And also dump that variable title Chevy Car Commercial into the <title> of the web page... I have made dynamic pages before... but that was using a form..
List Files In Directory For Apache Alias
I want to list the files in a given <dir> with a given file extension ... opendir() or scandir() would seem to be my solution. BUT! those files are outside the root dir of the site ... accessed via an apache alias. so opendir() and similar functions do not seem to work as I cannot feed it a relative path. is there a way to do this? my page: <http://myintranet/prodinfo/listdir.php> http location of dir to be listed: <http://myintranet/dailies/> /dailies/ is an alias pointing elsewhere on the server. indexing has been turned on for this alias in apache, so loading the above URL shows the dir contents by default. so for example ... this works because /images is in the root of the web dir: $myDir = "../images/"; $scanFiles = scandir($myDir); print_r($scanFiles); this does not work as dailies is an alias and not a dir in the web root: $myDir = "../dailies/"; $scanFiles = scandir($myDir); print_r($scanFiles); one option I see is to grab the html of that apache auto-generated index page and parse the content to grab the links out of it. but this seems rather roundabout, and with all the great php file tools, I'm hoping there's a much simpler way. does anyone have any ideas, or is there some addtl info I can provide to make my question clearer?
Linking A
I am using this code echo "<tr><td></td><td id=tablesdirhead>Property Information</td><td id=tablesdirhead width=ï`'>Agent Name</td><td id=tablesdirhead width=ï‡'>Contact Info</td></tr> "; while ($myrow = mysql_fetch_row($result)) { $row = 1-$row; $color = ($row==0)?"#F5F5F5":"#F0F8FF"; printf("<tr bgcolor=$color><td>%s</td><td>%s</td><td>%s</td><td>%s</ td></tr> ", $myrow[5], $myrow[3], $myrow[0], $myrow[1]); } echo "</table> "; ?> But would like to give the fourth "$myrow[1]" a PHP link like <a class="dir" href="processformImage.php?action=&ID=<?php echo $row["StoreID"]; ?>">$myrow[1]</a>
E-commerce And PHP Linking
I've done a little research and decided (for now) to use Verisign for the credit card processing, and link that to a Wells Fargo merchant account, which, as far as I know, should work just fine... so here are my quesitons. is Verisign a good payment gateway? do they support PHP? If so, how, if not, who does support PHP? Is there anything else I need in between verisign and the bank? Am I completely lost and going the entire wrong way?
IFrame Linking
I've just realised that this is probably a php question, so i might as will link it here: http://forums.devshed.com/showthrea...7090#post177090
Linking Outside An IFrame
I have an iframe with a page and a link above it to the actual page. For eg :- <div><a href="http://google.com">click here for original</a></div> <iframe src="http://google.com" /> Now, as everyone knows, clicking a link inside this iframe will open the link in that frame too (unless specified). When a click is made i want to "click here for original" link to be changed too. To link to page that is showing inside the frame.
Auto Linking
i'm tryin go to do a auto link thing and i'm running into some problems with my mysql statements $sql_query = "SELECT * FROM tags"; $result = mysql_query($sql_query) or die(mysql_error()); $result = mysql_fetch_assoc($result); foreach($result as $res){ $res["tag"] = $tag; $res["link"] = $link; } echo "Test".$tag; $keyword_array = array( $tag => $link, );
Linking Above The Webroot
i've been trawling the net for a few hours trying to get information on this but so far im not really finding any answers. I'm trying to link to files above the webroot (redhat & php 4.4.4) in order to not make the accessible by simply typing http://www.domain.com/file.mp3 everywhere i reading is that i would need to change my apache conf or use php to redirect. i've tried links like /home/myuser/products/file.mp3 but to no avail. If i change my apache conf file won't this still allow anyone to access the files if they knew the address? Can anyone shed any light on how i might do this?
List Contents Of A Folder, Make List Of Links
Does anyone know how I can write a script that: - reads in all the files in a particular directory - displays the file names in a html list and makes a link of them: <ul> <li><a href="filelocation1">filename 1</li> <li><a href="filelocation2">filename 1</li> <li><a href="filelocation3">filename 1</li> </ul> etc.? So basically it creates a list of links with the contents in that directory, so you can download them from there.
Get List Of Messages From One Table, Message List Indicator From
I have two tables. One has a list of messages left by users using fields named mbxno for the mailbox and msgno for the message number. I have another table that has mailbox settings for each user that contains a field named "messagelist" to indicate if they want to be included on the message list or not. What I'm trying to create is a list of the most-recent messages with a lookup on the users table to indicate whether a message in the list should be included in the message list based on the user's mailbox settings. SELECT messages.msgno, messages.mbxno, users.messagelist FROM messages, users WHERE (users.messagelist = Ƈ') ORDER BY msgno DESC LIMIT 100 What I'm getting, though is a list that looks like this: mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 I think what's happening is that I'm using the wrong type of join and more rows are being created than necessary. If I add "DISTINCT" to the query, I get a list of the most-recent messages as I expect, but the "messsagelist" value is sometimes wrong (again, probably because the data is getting jumbled). For example, the messagelist value for the second row (2214) should be 0, not 1. mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 2214 msgno: 0412141622 msglist: 1 mbxno: 2189 msgno: 0412141408 msglist: 1 mbxno: 0000 msgno: 0412141213 msglist: 1 mbxno: 0003 msgno: 0412141213 msglist: 1 mbxno: 2265 msgno: 0412132029 msglist: 1 mbxno: 0000 msgno: 0412131950 msglist: 1 How should I be doing this? If nothing else, what kind of join will work with a long list compared to a value from a short list?
Dynamic Linking In Content
I have a query. What I am trying achieve is to do some on the fly linking. What I have is some content from a DB, and within the content if a particular word appears then I would like to insert a link to the product page. Now I'm not quite sure the best way of implementing this. whether I should create a keywords table in the DB and then compare the content with the keywords table? Any suggestions or examples of code?
Linking To Files Which Contain A Space
I'm getting errors when I try to view a file located on the server which has a space in it's name. For example "test file.txt" gets a link of "http://www.domain.com/directory/test ". Files with no spaces such as "test_file.txt" are fine. PHP Code:
Recordset Paging+linking To Self
I've built a dynamic page with recordset paging, loading 10 thumbnails dynamically per page. Each thumbnail has a link with a url variable (?image=whatever.jpg) to load a larger image on the page. This works great with just one page eg. page.php?image=whatever.jpg, but when I page to the next page, it's nolonger page.php, so when a thumb is clicked it loads up the original page with the image, and you have to scroll through the records to get back to where you were. I've tried binding the recordset paging link to the thumbnail, and can get it to work, but as you click thumbs, the url is not refreshed, the variable is just added to the end of the previous url, so if you click a few thumbs you end up with a very long url.
Black Hat Or Not? Linking Technique Using PHP
I had an idea that I wanted to see what people think of it. I'm optimizing a site that is already built w/ very generic file naming and directory structure. In other words, I don't have directories or file names that intentionally have keywords in them. For the most part, its just a lot of index.php and one-word names. So now I'm trying to figure out a way to get some keyword URL's in there w/o trashing my directory structure. Here's what I'm thinking: Let's say I have a link already in the page that goes to index.php. What if I changed the link to keyword_term.php, then I put the following code in keyword_term.php: <?php $no_spider = "TRUE"; include "index.php"; ?> index.php would then have this in the header: <?php if ($no_spider = "TRUE") { echo "<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">"; } ?> I know it seems like more work than its worth, but the idea is that in the long run, I can optimize multiple pages for different keywords, while requiring little maintanence if I decide to edit the original index.php. I'm also using the $no_spider variable to aviod being penalized for duplicate content. My intention is not to get index.php indexed multiple times, just to allow other pages to link to it using different file names.
Automatically Linking URL's
When somebody enters info into a form on my page how do I make the script I am using automatically make URL's into links?
Auto Linking To Html
Iam building a login form page in PHP that runs a PHP script. The form contains a $variable that passes to the script. Then I would like to direct automatically to the link below: http://www.$variable.com/login.htm What would the PHP command be to action the above link?
NS 6 Linking To The File And Not The Server?
I have a link looking like this: <a href="<?php $_ENV["SERVER_NAME"]; ?>">LINK</a> With IE it works fine, but in NS the link is servername/file_where_the_link_is.php How do I fix that?
Linking To A Named Anchor
I've got a PHP script for a very basic CMS which links a page to itself when a "Submit" button is clicked in a form, at the same time a variable "Number" is sent, telling the script which particular "Submit" button was clicked. The following script takes place in a PHP loop using the counting variable $i: Code:
Linking To Page.php?id=variable
I am trying to create an edit/delete user interface similar to the edit/delete section of the mysql database page. each record in the table will have an edit delete beside it. All my attemps so far to link the 'edit' to the corresponding record bring up mypage.php?=(my calculations trying to get the record id, instead of the record id itself) how does one go about creating a dynamic link coorsponding to the record that is needed to be editted? I have the table being created corectly, with edit/delete beside them, but I can't get the link to turn out correctly.
Compile/Linking Problem
So it seems that there still is an incompatibility between GD and libpng-1.2.x... fine So I installed into a dedicated directory an older version, 1.0.15 In my configure line I inserted --with-png-dir=/my/old-libpng/path Everything goes fine, and all once built [patrice@localhost php-5.0.0b1]$ ldd sapi/cli/php|grep png libpng.so.2 => /usr/lib/./libpng.so.2 (0x40350000) The command line php is indeed linked against the "old" libpng and all works like a charm, but... [patrice@localhost php-5.0.0b1]$ ldd libs/libphp5.so |grep png libpng.so.3 => /usr/lib/libpng.so.3 (0x403bc000) The Apache module (--with-apxs) is linked against my system libpng, so any script that calls ImageCreateFromPng() causes apache to SegFault :-((( How do I tell apxs to link according to the configure script ?
Database Record Linking
I develop websites on the side, it is basically a hobby. An organization has approached me to develop a site for them which I may or may not take depending on one thing. This organization would like individuals within their organization to be able to access their individual information via a password protected area. The information will contain their hours worked, hours needed for next level, credits earned,and test scores.The individual should only be able to access their information only. I use MS Front Page, and NetObjects. Is this possible with these programs and if not what is reccomended?
Linking PHP C++ Extensions With -lstdc++
I am trying to make a simple extension to PHP using C++. (Most of the extensions to PHP are just plain C.) I am working from the PHP documentation and this guide: http://bugs.tutorbuddy.com/phpcpp/phpcpp/index.html http://www.php.net/manual/en/zend.build.php My problem is that the link command that the build system uses doesn't include "-lstdc++" on it, leading to this error when you actually try to use the module: Warning: dl() Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20020429/cppext.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20020429/cppext.so: undefined symbol: __gxx_personality_v0 in /root/php-extension/php-4.3.4/ext/cppext/cppext.php on line 3 I know the issue will be solved if I can just get the link command to have -lstdc++ on it, because when I cut and paste that command to the prompt, add that flag, and install that hand-linked module, it works. My question is how to make that happen. I have tried a number of variations of the PHP_ADD_LIBRARY macro in config.m4 (in my extension directory). None of them work, even if I run ./configure and even re-run phpize. I am using apache 2.0.48, php 4.3.4, and after having these problems initially I have upgrade libtool to 1.5.2, automake to 1.8.2, and autoconf to 2.59. The OS is Redhat 9, with pretty much everything stock, except I removed the apache and php rpms and installed those from source. The autoconf/automake/libtool build systems that I have experience will use a Makefile.am file that is relatively simple and it is easy to figure out where to put additional files as you add them, includes, and linked librarys. There is no Makefile.am in the build system created by phpize; is config.m4 the standard place to add new source files, include directories, and linked libraries ? Finally, is there an example C++ extension to PHP on the web somewhere, that I might examine in order to copy it's build system ?
Sort_Order Linking Tables
I am trying to setup a database of all my Films/Games, and so far it has proven very successful. But at the moment I have seperatae pages for every letter of the alpabet (e.g A.php, B.php, C.php ...) so that I can display all the titles alphabetticaly, (e.g. If I Click on the A link it will display every title beginning with A.) At the moment this works very well, but I would just like to know if anyone out there knows some very simple lines of code which I could use so that this is all done via one page, instead of me having loads of pages, because when I decide I want to upgrade the database I will have to update every page.. The pages can be found at: http://djsleepy.servebeer.com/~plon..._database/Test/ at the moment the main page opens a new window when you click on a letter for example, if I click on A it will open in a new window, if I click on B it will open in a new window..I would like to keep this part as it is..
Linking To Video File?
This is more strictly an HTML problem, but as I'm also using PHP and the HTML groups seem to be infested with spam, I'm posting it here! At the school where I work I've got an online searchable database of video tapes and dvds, using MySql and PHP on a Linux machine. It works fine. I'm trancoding some of the tapes to avi files, which can be accessed as a samba share. I'd like to put clickable links into the database, so if a user sees the file is coloured blue, they can click it and it plays. I've got it working, but: Using a 'href' link in HTML code of the PHP powered web page, the file is downloaded at the user end completely before it starts playing, which results in an unacceptably long delay. But if a user accesses the file directly using the samba share directory, the video starts almost immediately and 'streams'. How can I embed into my PHP powered web page a link that uses samba file sharing, so it streams,
Includes(not Linking Corrrectly)
my problem is that my a.php page is in a folder called main in the root...so the url would be http://www.mysite.com/main/a.php But when I try to have an include like include("includes/z.php"); nothing shows up...the include doesn't seem to show up. Is there anyway I can fix this? P.S. root/main/a.php and root/includes/z.php those are the locations of the files...so im not sure what im doing wrong.
Linking To A MySQL Result
I had it the other day but now altered the code for my real database and it stopped working. Here is the first page which lists the 10 most recent news stories: <?php require ('get_connected.php'); $sql = mysql_query ("SELECT title, story_id FROM news ORDER BY story_id DESC LIMIT 0, 10"); while ($row = mysql_fetch_assoc($sql)){ echo "<a href='view.php?id={$row['story_id']}'>" . ucwords(strtolower($row['title'])) . "</a><br>"; } ?> And here is the page that should be displaying the news story based on story_id selected by the user.....
Linking To Dynamic Extension Dlls
Hi, I'm having problems linking to one of the dynamic extension .dll files (php_imap.dll) from the php.ini files. I'm running PHP 4.1.1 on IIS 5 and have un commented the extension=php_imap and specified the path where my dll is being stored:- C:/WINDOWS/SYSTEM32/ When I try and run anything through the PHP.EXE with IIS I get an error alert saying that the file has not been found..... but it's definately there!!
Linking Tables To Display Data?
I want to link two tables together to create a list. The unique value loppnum appears in both tables. I need to look up its corresponding value for each entry. table1 has 2 cols A Jag D Cht E Lio P Mkn Q Res table2 has 2 cols MN A PL D RT E PO P LM D NB D In the first table both values are unique In the second table the first value is Unique Now I need to display a list of data in this form MN Jag (Displays second table data and looks up value of A in first table) PL Cht (Displays second table data and looks up value of D in first table) RT Lio (Displays second table data and looks up value of E in first table) PO Mkn (Displays second table data and looks up value of P in first table) LM Cht (Displays second table data and looks up value of D in first table) NB Cht (Displays second table data and looks up value of D in first table) I have made a start $upgcollect='SELECT * FROM table1 ORDER BY scfmfor' $upg1=mysql_query($upgcollect); $ml_collect='SELECT * FROM table2 ORDER BY loppnmn' $upg2=mysql_query($ml_collect); That gives me two variables with complete table data. The rest of this is beyond me at the moment.
Trouble Linking One Table Entry To Another
I very new to PHP but like what I'm getting into. I know this is a simple question with a simple answer, and I know I must be missing something easy. I have a contact table, which naturally lists all of our clients. When they make a purchase, we update the order table and as part of that, we need to tie that order back to their client entry. When I try to pick up and enter the "clientID" in the order table, all I get is a zero(0). Everything else populates correctly. Below are the two scripts involved. The first is the display where the ClientID comes from, and yes, it gets passed over to the second, but does not make it to the SQL statement. Any advice would be appreciated...Sorry for the messy code...
Linking Back Into MySQL From A Return
I have a simple contact table with a catagory, name, address columns and I'm sorting it by catagory then name. My question is after I get this return how I can make each catagory listing link back into the database to return all its members in a seperate part of the page. I can make a simple echo html table loop to return the catagory data, but how do I also include an <a> link to each catagory listing so that it will then access the database and dump it into another part of the page.
Linking Information From Two MySQL Tables
I'll pulling information from a single mySQL database table, but need to retrieve data from another table within that database and tie it with data from the first table. Simple explanation.... I have some URLS and headlines in table 'news' with category numbers for each URL. The category names are stored in the second table 'topic' along with the associated numbers. (The 'id') In the output page I want to replace the category numbers with the category names, but I don't know the syntax. PHP Code:
Linking Multiple Records From Another Table
I'm not sure I'm even thinking about this the right way, but here goes: I have a table of users. Each one of these users may be associated with none, one, or many records in another table I call a todo table. table user = 'id', 'name', 'bla bla bla','todo_list' table todo = 'id','title','other info' Suppose user 'id=1253' has on his todo list items 756,241, and 672. I create a string 756,241,672 and store that string in the user's todo_list field. Then when I want to display the todo items I get the string with a query, bust it up into an array, iterate the array and query the todo table. I have a gut feeling I'm making it way more complicated than need be. But I can't think of any other way to do it
Linking Php Function In Onchange Event
i have probelm in linking php function in onchange() event. I am new to php. Im my database (test) ,i have per_det as table whic have two cloumn(eno, ename). My query is list all eno from database in combo box. when user select the eno the respective name from database should be displayed in textbox, Code:
Linking A Page With Phpbb Forum
iv been trying to do this for a while, link my website users with phpBB forum users so they only need to register once. Now someone was kind enough to give me this code to get the users information: Code:
Linking Data And Generating New Pages
i have seen websites that have data stored in databases and when a link is clicked a template page is generated with the data instead of having a separate page for every single item associated with a user. The address bar when clicked will look something like this: http://www.blahblah.com/user/index.php?id=view&&1918373707 I have two flat file databases. One, categories with the structure --> username|catname|catid and the other content with the structure --> username|catid|date|text I need some code please that will make a link between the 'catid' in both databases and then do that URL thing above to link to a generated page (or template page) where i can then echo out all information. I will post the code to show you how i am producing the links that i want people to click. Code:
Mailing List Manager, Send To List
I'm looking for a mailing list script (php) that has a function to let users to reach out to all recipient on the list by simple send the email to a specific maillist- address. Mailman has this functionn but as a just got a webserver account I can't use mailman nor install it.
Linking To Update Database In Printf Statement
I have the following statement: printf("<tr><td class="ltgrey">%s<td class="ltgrey">%s, %s</td><td class="ltgrey">%s<td class="ltgrey">%s<td class="ltgrey">%s</tr>", $myrow["client"], $myrow["last"], $myrow["first"], $myrow["phone"], $myrow["email"], $myrow["url"]); and wish to have the client displayed as a link so that a user can clik on it to update the information in the db. How can i do this?
Linking A User 'Signup Form' To 'Service Agreement'
Can someone give me a suggestion on the best way to do this? I have created a signup form which I have linked to a service agreement (waiver). I am sure the code in simple but I've never linked php pages together before. Here's what I have so far... 1) User choses a 'product' 2) Directed to a Sign up form (simple -name, email, phone etc.) 3) Must read service agreement and accept 4) Directed to shopping cart My trouble is between 2 and 3. I could do the server agreement in html but then I wouldn't be have any verification that registered users actually agreed to the service agreement. What kind of script would I use in the service agreement form to verify users have accepted it?
Simple Challenge - Working With Image Coordinates And Dynamic Linking.
(*** apologies for the X-Post, but I felt it was relevant to all the groups ***) I have a page with a large centre-aligned image on it. I want a functionality whereby users can click their mouse on any point in this image and it would then show a virtual mouse pointer at the place where they clicked it. If they were to click somewhere else, the position of the virtual cursor would change. The position of the cursor needs to dynamically generate a link and display it in a form field text edit box. If that link is then viewed separately, it would launch the same page with the virtual mouse pointer at the location where the original person placed it. Basically I want to be able to have one guy point to a location on the image for the benefit of another guy, but graphically as opposed to relying on written explanation. I can run CGI and PHP scripts if need be. Easy-peasy, or can of worms?
Active Directory / Exchange / Active Directory.
I'm creating an Intranet module for a client (Forum, files upload...etc...etc). This client already has a huge server running on WIN2000 + IIS 4 + Exchange + Microsoft Active directory + proxy and finally PHP 4.03 + MySql. Problem #1 : All passwords are changed every weeks, so I want to be able to import users/pass from Microsoft exchange .... Does anyone have an idea to do such thing with PHP ? Problem #2: I would like that the user logged from the firm's network do not have to log. again when connecting the module. So, is it possible to do such thing ?
|