php-windows Digest 21 Feb 2005 18:52:11 -0000 Issue 2585 Topics (messages 25626 through 25648):
Re: Is there a way I can read full path names of fileson theserver and
enter it into the database ?
25626 by: Luis Moreira
25628 by: Zareef Ahmed
Re: getting "Couldn't get file list" error.
25627 by: Luis Moreira
Re: php.ini
25629 by: Zareef Ahmed
php.ini detail
25630 by: christian tischler
25631 by: Luis Moreira
25632 by: Chris Ramsay
Getting .NET to work
25633 by: Csaba2000
php.ini - cookies
25634 by: christian tischler
25636 by: Jason Barnett
25648 by: christian tischler
Re: getting close ...but still "record doesn't exist"
25635 by: Patrick Roane
Re: Outputting MS Word document
25637 by: Christophe Deliens
25638 by: Christophe Deliens
Re: Looking for PHP development software
25639 by: Christophe Deliens
25640 by: Christophe Deliens
Re: Problem using Include Function with PHP5/Apache2.0/W2K3 Server
25641 by: Christophe Deliens
25642 by: Christophe Deliens
Re: php.ini - cookies]
25643 by: Jason Barnett
Re: Time limit in the script
25644 by: Christophe Deliens
25645 by: Christophe Deliens
Re: Header Location pointing to a file
25646 by: Christophe Deliens
25647 by: Christophe Deliens
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---Have you tried to read the manual ? There is a lot of info on how to do this. Anyway, I think this does the trick :
if ($handle = opendir('FULLPATHNAME')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") {
At this point, $file contains the file name. On the next cycle, it will get the next name, and so on.
Luis
Vaibhav Sibal wrote:
Hello, I wanted to ask whether there is a way whereby a script can read filenames from a particular directory on the server and enter those filenames with the complete path into the MySQL database? I am trying to do this, because I am developing an application where a supervisor will be distributing files to different users, and those users are to work on the files allocated to them by the supervisor. There is a big pool of files containing around 10k-15k files and the supervisor will be instructed to allocate around 200 files to a user each day, and the user should be able to open that file and work on it. I am using a Linux Fedora core 2 server running Apache 2.0.53 and PHP 5.0.3 and MySQL, and my clients are Windows clients. So I wanted to ask all of you people what would be a better approach to do this, the following are the 2 options :
(1)As soon as the supervisor selects say around 200 files for a user called robert, 200 files from the file pool automatically get copied to the home directory of robert. While they are copied to the home directory of Robert, the name of each file with their complete path name gets logged onto the database. Now I am doing since because I need to know where each file went and what user is working on what file. Now since robert is working on a client running on windows, we can map a drive of windows onto the home directory of robert. In this scenario can we instruct PHP to open files from a local directory (i.e. the mapped directory of windows)? Because I need to, somehow, log when a user opened the file and when he closed it.
(2) The second scenario is that, I just enter the name of the files allocated to a user alongwith the complete pathnames to a database and I have another column this time where I store the user's name. Now whenever the user logs into our system using his username and password, and checks to see his work, he sees a list of files on the browser itself, but now we will have to convert this list of files into links so that the user can click on the links and directly open the file in the required software from the server itself. The issue, again, in this kind of design is that how do i open the file in the required software and even if i do it then how do i record when the user opened the file and when he finished working on it.
I would request all of you to please help me in this, since I am a student and in the learning phase and this is a part of my project. If you have any doubts about whatever I have written here please write to me. I would be really grateful if you all could help me in this endeavour.
Thanks in advance
Vaibhav
--- End Message ---
--- Begin Message ---On Mon, 21 Feb 2005 09:02:21 +0000, Luis Moreira <[EMAIL PROTECTED]> wrote: > Have you tried to read the manual ? > There is a lot of info on how to do this. > Anyway, I think this does the trick : > > if ($handle = opendir('FULLPATHNAME')) { > while (false !== ($file = readdir($handle))) { > if ($file != "." && $file != "..") { > You can use this with combination of basename, dirname etc. > At this point, $file contains the file name. > On the next cycle, it will get the next name, and so on. > > > Luis > > Vaibhav Sibal wrote: > > >Hello, > >I wanted to ask whether there is a way whereby a script can read > >filenames from a particular directory on the server and enter those > >filenames with the complete path into the MySQL database? I am trying > >to do this, because I am developing an application where a supervisor > >will be distributing files to different users, and those users are to > >work on the files allocated to them by the supervisor. There is a big > >pool of files containing around 10k-15k files and the supervisor will > >be instructed to allocate around 200 files to a user each day, and the > >user should be able to open that file and work on it. I am using a > >Linux Fedora core 2 server running Apache 2.0.53 and PHP 5.0.3 and > >MySQL, and my clients are Windows clients. So I wanted to ask all of > >you people what would be a better approach to do this, the following > >are the 2 options : > > > > > >(1)As soon as the supervisor selects say around 200 files for a user > >called robert, 200 files from the file pool automatically get copied > >to the home directory of robert. While they are copied to the home > >directory of Robert, the name of each file with their complete path > >name gets logged onto the database. Now I am doing since because I > >need to know where each file went and what user is working on what > >file. Now since robert is working on a client running on windows, we > >can map a drive of windows onto the home directory of robert. In this > >scenario can we instruct PHP to open files from a local directory > >(i.e. the mapped directory of windows)? Because I need to, somehow, > >log when a user opened the file and when he closed it. > > > >(2) The second scenario is that, I just enter the name of the files > >allocated to a user alongwith the complete pathnames to a database and > >I have another column this time where I store the user's name. Now > >whenever the user logs into our system using his username and > >password, and checks to see his work, he sees a list of files on the > >browser itself, but now we will have to convert this list of files > >into links so that the user can click on the links and directly open > >the file in the required software from the server itself. The issue, > >again, in this kind of design is that how do i open the file in the > >required software and even if i do it then how do i record when the > >user opened the file and when he finished working on it. > > > >I would request all of you to please help me in this, since I am a > >student and in the learning phase and this is a part of my project. If > >you have any doubts about whatever I have written here please write > >to me. I would be really grateful if you all could help me in this > >endeavour. > > > >Thanks in advance > > > >Vaibhav > > > > > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Zareef Ahmed :: A PHP Developer in India ( Delhi ) Homepage :: http://www.zareef.net
--- End Message ---
--- Begin Message --- You send way too much info, forcinf people to read through all of it, to understand your way of thinking and your problem.
Keep it simple.
Anyway, I think there is something wrong in here
$sql = "SELECT furn_pic";
$sql .= "FROM crost"; $sql .= "WHERE item_num = $item_num";
$result = mysql_query($sql)or die("Couldn't get file
list");
Unless I am very much mistaken, PHP does not invent spaces whiel concatenating strings.
Insert one space before the words FROM and WHERE, otherwise you will get something like
SELECT furn_picFROM crostWHERE item_num = ...
Luis
Patrick Roane wrote:
I am trying to display a gif file that I've
successfully stored up to mysql. I have 3 short files
that all work to gether to accomplish this task.
1. get_image.html (no problems w/this one)
2. get_image.php (I think this one is fine too)
3. crostchair.php (this one has the problem)
It is with the 3rd file where the problem exists.
Here is a clip from that file:
-----------------------------------------------------
$sql = "SELECT furn_pic";
$sql .= "FROM crost"; $sql .= "WHERE item_num = $item_num";
$result = mysql_query($sql)or die("Couldn't get file
list"); ---------------------------------------------------------
At first, I had to rem out my initial 3 lines of code
to even get as far as I did, or I'd get "invalid
modelID specified"
--------------------------------------------------------
<?php
#global $item_num;
#if(!is_numeric($item_num))
#die("Invalid modelId specified"); ------------------------------------------------------- In my db table, item_num is an AUTO_INCREMENT primary key. --------------------------------------------------------- Here is code for get_image.php: ------------------------------------------------------- <?php
/*----------------------------------------------------start of database connection/selection------------------------------*/
$link = mysql_pconnect( "localhost", "", "" ); if ( ! $link ) { $dberror = mysql_error(); return false; }else { print "<h2>Successfully connected to server</h2>\n\n"; }
if ( ! mysql_select_db( "myfiles", $link ) ) { $dberror = mysql_error(); return false; } mysql_select_db("myfiles");
$dbQuery = "SELECT item_num, model_id, furn_name ";
$dbQuery .= "FROM crost ";
$dbQuery .= "ORDER BY model_id ASC";
$result = mysql_query($dbQuery) or die("Couldn't get file list");
?> <!------------------------------------------end of database connection/selection------------------------------------------>
<!------------------------------------------start of HTML column headings------------------------------------------> <table border="1" cellpadding="0" cellspacing="0" bordercolor="#111111" width="100%">
<tr>
<td width="34%" bgcolor="#FF9900" height="21">
<p style="margin-left: 10"><b><font size="2" face="Verdana" color="#FFFFFF">
Model ID</font></b></td>
<td width="33%" bgcolor="#FF9900" height="21">
<p style="margin-left: 10"><b><font face="Verdana" size="2" color="#FFFFFF">
Furniture name</font></b></td>
<td width="33%" bgcolor="#FF9900" height="21">
<p style="margin-left: 10"><b><font face="Verdana" size="2" color="#FFFFFF">
File</font></b></td>
</tr>
<!------------------------------------------end of HTML column headings------------------------------------------>
<!-------------start of HTML table that inludes ID, name and pic of each piece of furniture ------------------------------------------>
<?php
//As mentioned above, we will be displaying each file as a table row. The HTML code above creates this table.
while($row = mysql_fetch_array($result))
{
?>
<tr>
<td width="34%" bgcolor="#FFDCA8" height="21">
<p style="margin-left: 10; margin-right: 10">
<font face="Verdana" size="1">
<?php echo $row["model_id"]; ?>
</font>
</td>
<td width="33%" bgcolor="#FFDCA8" height="21">
<p style="margin-left: 10">
<font face="Verdana" size="1">
<?php echo $row["furn_name"]; ?>
</font>
</td>
<td width="33%" bgcolor="#FFDCA8" height="21">
<p style="margin-left: 10"><font face="Verdana" size="1">
<a href="crostchair.php?fileId=<?php echo $row["item_num"]; ?>">
Download now
</a></font>
</td>
</tr>
<?php
}
echo "</table>";
?>
--------------------------------------------------------- here is code for crostchair.php --------------------------------------------------------- <?php #global $item_num;
#if(!is_numeric($item_num))
#die("Invalid modelId specified");
/*----------------------------------------------------start of database connection/selection------------------------------*/
$link = mysql_pconnect( "localhost", "", "" ); if ( ! $link ) { $dberror = mysql_error(); return false; }else { print "<h2>Successfully connected to server</h2>\n\n"; }
if ( ! mysql_select_db( "myfiles", $link ) ) {
$dberror = mysql_error();
return false;
}
$sql = "SELECT furn_pic";
$sql .= "FROM crost"; $sql .= "WHERE item_num = $item_num";
$result = mysql_query($sql)or die("Couldn't get file
list");
if(mysql_num_rows($result) == 1)
/*-----if row returned from our query, we save its actual data to a variable, $fileContent.----------------------------------------------*/ {
$fileContent = @mysql_result($result, 0, "furn_pic");
header("Content-type: $fileType");
echo $fileContent;
}
else
{
echo "Record doesn't exist.";
}
?> Any ideas?
===== Patrick Roane Web design and development www.franklin-band.com Fox River Grove, Il.
--- End Message ---
--- Begin Message ---Hi, First run phpinfo(); funciton in one of your script then look for the path of php.ini in the out put of your script, one you know where is php.ini ... you can read that, there are lot of instructions as comments. zareef ahmed On Sun, 20 Feb 2005 15:29:14 -0000, christian tischler <[EMAIL PROTECTED]> wrote: > I have just installed php 4.3.10 on a w2k server with IIS. > > I have several problems and i think all of them are because php.ini is not > properly configured. I have tried to do this but am not sure about all the > switches? > > In detail the problems are: cannot use cookies, argument aren't seperated > properly (with &)... > > Please can someone help with were i can get some info how to setup php.ini > to work for me. > > Thanks > Christian > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Zareef Ahmed :: A PHP Developer in India ( Delhi ) Homepage :: http://www.zareef.net
--- End Message ---
--- Begin Message ---Hi, Please help... I think my php.ini is at fault but maybe it is something different. when i pass on more than one argument in the url they are seperated by %0F% rather than &. Whatever i tried i cannot change that and therefor use more than one argument??? Thanks Christian
--- End Message ---
--- Begin Message ---I am not sure I understand your problem.
The separation of parameters is something YOU do, not PHP. An example of a call would be
http://www.test.com/script.php?name=Luis&state=active
to call SCRIPT.PHP with parameters "name" and "state".
christian tischler wrote:
Hi,
Please help...
I think my php.ini is at fault but maybe it is something different.
when i pass on more than one argument in the url they are seperated by %0F% rather than &. Whatever i tried i cannot change that and therefor use more than one argument???
Thanks
Christian
--- End Message ---
--- Begin Message ---Christian, Does the data handling part of php.ini look like the following? ### ;;;;;;;;;;;;;;;;; ; Data Handling ; ;;;;;;;;;;;;;;;;; ; ; Note - track_vars is ALWAYS enabled as of PHP 4.0.3 ; The separator used in PHP generated URLs to separate arguments. ; Default is "&". ;arg_separator.output = "&" ; List of separator(s) used by PHP to parse input URLs into variables. ; Default is "&". ; NOTE: Every character in this directive is considered as separator! ;arg_separator.input = ";&" [...] ### It does sound to me as though the problem is linked with the way the argument seperator is being handled - hence your problem with any more than one argument at a time... HTH Chris Ramsay
--- End Message ---
--- Begin Message ---I want to be able to run the .NET example at: http://at.php.net/manual/en/class.dotnet.php When I tried it on my Win XP Pro, SP2 machine using the CLI (command line) version of PHP I got: Fatal error: Uncaught exception 'com_exception' with message 'Failed to init .Net runtime [CoCreateInstance] Class not registered The DOCs said I need to install the .Net runtime to be able to use it so I went to: http://msdn.microsoft.com/netframework/technologyinfo/Overview/default.aspx and thence to http://msdn.microsoft.com/netframework/downloads/updates/default.aspx and was totally confused. Could someone please help out and say what, actually, I am supposed to download and how it should be installed Thanks, Csaba Gabor from Vienna
--- End Message ---
--- Begin Message ---help again, please. I asume it is a problem with php.ini but cookies don't work for my website. can anyone tell me the right configuration or the php.ini to make cookies work. Thanks Christian
--- End Message ---
--- Begin Message ---Christian Tischler wrote: > help again, please. > > I asume it is a problem with php.ini but cookies don't work for my website. > > can anyone tell me the right configuration or the php.ini to make cookies > work. > > Thanks > > Christian Cookies require two parts: the server and the browser. Let's check your browser. Open up your web browser and see if there are stored exceptions for your website (i.e. "allow", "deny", "allow for session only", "deny 3rd party cookies"). If there is any rule there, delete it. Next you need to check if your browser will automatically make cookie choices for all web sites... again options here are probably "allow", "deny", etc. The best option is to disable all automatic choices (so that you can see when / if the site is trying to set a cookie in your browser). Then browse to your web page (http://www.yoursite.com/page.php) and see if it asks to store a cookie. At this point if the browser doesn't ask to set a cookie you can be pretty sure it's a server issue. So go try the above first and if this test fails then we'll try to help you with your PHP problem. This is a browser (*ahem* IE *ahem*) issue until proven otherwise... ;) -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-general&w=2 STFM | http://www.php.net/manual/en/index.php STFW | http://www.google.com/search?q=php LAZY | http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins
signature.asc
Description: OpenPGP digital signature
--- End Message ---
--- Begin Message ---Thanks for that. I have tried your suggestions but no succes. I asume it's a server issue. I have the same wesite on a webserver of my ISP and it's works fine there. Christian. "Jason Barnett" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---Thanks for information on this one. I am putting print statements in after my sql and getting more details about the problem. I proceeded to put spaces infront of my "from" & "where" statements. I am still getting a sql error, but I think it is past the prior trouble spot. Now, I get "Resource id #3Record doesn't exist." This is in reference to the last bit of sql code: $fileContent = @mysql_result($result, 1, "furn_pic"); header("content-type: $fileType"); echo $fileContent; } else { echo "Record doesn't exist."; } ?> Is this a simple problem to fix? --- Luis Moreira <[EMAIL PROTECTED]> wrote: > You send way too much info, forcinf people to read > through all of it, to > understand your way of thinking and your problem. > Keep it simple. > > Anyway, I think there is something wrong in here > > $sql = "SELECT furn_pic"; > $sql .= "FROM crost"; > $sql .= "WHERE item_num = $item_num"; > $result = mysql_query($sql)or die("Couldn't get > file > list"); > > Unless I am very much mistaken, PHP does not invent > spaces whiel concatenating strings. > Insert one space before the words FROM and WHERE, > otherwise you will get something like > > > SELECT furn_picFROM crostWHERE item_num = ... > > Luis > > > Patrick Roane wrote: > > >I am trying to display a gif file that I've > >successfully stored up to mysql. I have 3 short > files > >that all work to gether to accomplish this task. > > > >1. get_image.html (no problems w/this one) > > > >2. get_image.php (I think this one is fine too) > > > >3. crostchair.php (this one has the problem) > > > >It is with the 3rd file where the problem exists. > > > >Here is a clip from that file: > >----------------------------------------------------- > >$sql = "SELECT furn_pic"; > > $sql .= "FROM crost"; > > $sql .= "WHERE item_num = $item_num"; > > $result = mysql_query($sql)or die("Couldn't get > file > >list"); > >--------------------------------------------------------- > >At first, I had to rem out my initial 3 lines of > code > >to even get as far as I did, or I'd get "invalid > >modelID specified" > >-------------------------------------------------------- > ><?php > > > > #global $item_num; > > > > > > #if(!is_numeric($item_num)) > > > > #die("Invalid modelId specified"); > >------------------------------------------------------- > >In my db table, item_num is an AUTO_INCREMENT > primary > >key. > >--------------------------------------------------------- > >Here is code for get_image.php: > >------------------------------------------------------- > ><?php > > > >/*----------------------------------------------------start > >of database > >connection/selection------------------------------*/ > > > >$link = mysql_pconnect( "localhost", "", "" ); > > if ( ! $link ) { > > $dberror = mysql_error(); > > return false; > > }else { > > print "<h2>Successfully connected to > >server</h2>\n\n"; > > } > > > > if ( ! mysql_select_db( "myfiles", $link ) ) { > > $dberror = mysql_error(); > > return false; > > } > > mysql_select_db("myfiles"); > > > > $dbQuery = "SELECT item_num, model_id, furn_name > "; > > > > $dbQuery .= "FROM crost "; > > > > $dbQuery .= "ORDER BY model_id ASC"; > > > > $result = mysql_query($dbQuery) or > die("Couldn't > >get file list"); > > > >?> > > > ><!------------------------------------------end of > >database > >connection/selection------------------------------------------> > > > > > ><!------------------------------------------start > of > >HTML column > >headings------------------------------------------> > > > > > > > > > <table border="1" cellpadding="0" cellspacing="0" > >bordercolor="#111111" width="100%"> > > > ><tr> > > > ><td width="34%" bgcolor="#FF9900" height="21"> > > > ><p style="margin-left: 10"><b><font size="2" > >face="Verdana" color="#FFFFFF"> > > > >Model ID</font></b></td> > > > ><td width="33%" bgcolor="#FF9900" height="21"> > > > ><p style="margin-left: 10"><b><font face="Verdana" > >size="2" color="#FFFFFF"> > > > >Furniture name</font></b></td> > > > ><td width="33%" bgcolor="#FF9900" height="21"> > > > ><p style="margin-left: 10"><b><font face="Verdana" > >size="2" color="#FFFFFF"> > > > >File</font></b></td> > > > ></tr> > > > ><!------------------------------------------end of > >HTML column > >headings------------------------------------------> > > > > > > ><!-------------start of HTML table that inludes ID, > >name and pic of each piece of furniture > >------------------------------------------> > > > > > > > ><?php > > > >//As mentioned above, we will be displaying each > file > >as a table row. The HTML code above creates this > >table. > > > >while($row = mysql_fetch_array($result)) > > > >{ > > > >?> > > > ><tr> > > > ><td width="34%" bgcolor="#FFDCA8" height="21"> > > > ><p style="margin-left: 10; margin-right: 10"> > > > ><font face="Verdana" size="1"> > > > ><?php echo $row["model_id"]; ?> > > > ></font> > > > ></td> > > > > > > > ><td width="33%" bgcolor="#FFDCA8" height="21"> > > > ><p style="margin-left: 10"> > > > ><font face="Verdana" size="1"> > > > ><?php echo $row["furn_name"]; ?> > > > ></font> > > > ></td> > > > > > > > ><td width="33%" bgcolor="#FFDCA8" height="21"> > > > ><p style="margin-left: 10"><font face="Verdana" > >size="1"> > > > ><a href="crostchair.php?fileId=<?php echo > >$row["item_num"]; ?>"> > > > >Download now > > > ></a></font> > > > ></td> > > > ></tr> > > > ><?php > > > >} > > > >echo "</table>"; > > > >?> > > > >--------------------------------------------------------- > >here is code for crostchair.php > >--------------------------------------------------------- > ><?php > > > > #global $item_num; > > > > > > #if(!is_numeric($item_num)) > > > > #die("Invalid modelId specified"); > > > >/*----------------------------------------------------start > >of database > >connection/selection------------------------------*/ > > > > > > $link = mysql_pconnect( "localhost", "", "" ); > > if ( ! $link ) { > > $dberror = mysql_error(); > > return false; > > }else { > > print "<h2>Successfully connected to > >server</h2>\n\n"; > > } > > > > if ( ! mysql_select_db( "myfiles", $link ) ) { > > $dberror = mysql_error(); > > return false; > > } > > > > $sql = "SELECT furn_pic"; > > $sql .= "FROM crost"; > > $sql .= "WHERE item_num = $item_num"; > > $result = mysql_query($sql)or die("Couldn't get > file > >list"); > > > > if(mysql_num_rows($result) == 1) > > > >/*-----if row returned from our query, we save its > >actual data to a variable, > >$fileContent.----------------------------------------------*/ > > { > > > > > > $fileContent = @mysql_result($result, 0, > >"furn_pic"); > > > > > > > > header("Content-type: $fileType"); > > > > echo $fileContent; > > > > } > > > > else > > > > { > > > > echo "Record doesn't exist."; > > > > } > > > > ?> > >Any ideas? > > > >===== > >Patrick Roane > >Web design and development > >www.franklin-band.com > >Fox River Grove, Il. > > > > > > > > begin:vcard > fn:Luis Moreira (Eng) > n:Moreira;Luis > org;quoted-printable:Banco Espirito Santo - > ACE;Comunica=C3=A7=C3=B5es e Seguran=C3=A7a > adr;quoted-printable;dom:;;R. da Fraternidade > Oper=C3=A1ria, 5;Carnaxide;;2799 > email;internet:[EMAIL PROTECTED] > title:Analista > tel;work:+351 214168288 > tel;fax:+351 214168092 > tel;cell:+351 964643928 > note:Cliente de mail : Mozilla Thunderbird > url:http://www.moreiranet.com > version:2.1 > end:vcard > > ===== Patrick Roane Web design and development www.franklin-band.com Fox River Grove, Il.
--- End Message ---
--- Begin Message ---Hi
"application/msword" will do it.
Regards, Christophe Deliens -- get2future
Dale Attree wrote:Hi,
I have saved the content of an uploaded MS Word document into a database table.
Now I would like to output the content without recreating the file on the harddrive.
I believe I will have to use header("application/[what do i put here]").
Any ideas?
Kind Regards, Dale
--- End Message ---
--- Begin Message ---Hi
"application/msword" will do it.
Regards, Christophe Deliens -- get2future
Dale Attree wrote:Hi,
I have saved the content of an uploaded MS Word document into a database table.
Now I would like to output the content without recreating the file on the harddrive.
I believe I will have to use header("application/[what do i put here]").
Any ideas?
Kind Regards, Dale
--- End Message ---
--- Begin Message ---I *think* Zend Studio does that. -> http://www.zend.com/store/products/zend-studio.php
Chris.
Jim MacDiarmid wrote:Hi everyone,
I'm not sure if the software I'm looking for exists, but I was wondering if
there is a PHP IDE or utility program that has the functionality to
read/index php and html files in a website, and display and/or print a
graphical map or relationship diagram of all files based on include or
require statements?
Any ideas?
Jim
--- End Message ---
--- Begin Message ---I *think* Zend Studio does that. -> http://www.zend.com/store/products/zend-studio.php
Chris.
Jim MacDiarmid wrote:Hi everyone,
I'm not sure if the software I'm looking for exists, but I was wondering if
there is a PHP IDE or utility program that has the functionality to
read/index php and html files in a website, and display and/or print a
graphical map or relationship diagram of all files based on include or
require statements?
Any ideas?
Jim
--- End Message ---
--- Begin Message ---Hi,
Including with "/something.php" will in fact include "c:\something.php".
The root in PHP is NOT the website directory but the drive the sites resides on.
Tip: define a constant set to your website's root, and use that root in every include, so that it's absolute and no longer relative.
Tip2: put all your include files in a directory like "includes" and set the php directory include_path to it, so that you can include the file "includes/xxx.php" like this "include('xxx.php');"
Have fun! Chris.
Dave Adler wrote:I am new to PHP and Apache. I am trying to use the include function to include a file that has my web page header and menu, similar to what I used to do with SSI.
So I have a file called menu.inc that is in the /includes folder off of the doc root.
the file has HTML in it to display a menu and header
IN my main page, I have the line
<?php include("/includes/menu.inc"); ?>
Which I would expect to insert the HTMP from menu.inc at the location of the line of code.
The content of the include file doesn't display. Instead, I get a link that says function.main and below that I get a link that says function.include
I can run other PHP code with no problem. The include files are in a folder below the doc root called Includes.
This is running on Windows 2003 Server. I did a default install of Apache 2.0 and PHP 5.
This is probably a settig in httpd.conf or php.ini but I can't seem to find it in the docs.
Any help would be greatly appreciated.
Thanks in advance,
David
--- End Message ---
--- Begin Message ---Hi,
Including with "/something.php" will in fact include "c:\something.php".
The root in PHP is NOT the website directory but the drive the sites resides on.
Tip: define a constant set to your website's root, and use that root in every include, so that it's absolute and no longer relative.
Tip2: put all your include files in a directory like "includes" and set the php directory include_path to it, so that you can include the file "includes/xxx.php" like this "include('xxx.php');"
Have fun! Chris.
Dave Adler wrote:I am new to PHP and Apache. I am trying to use the include function to include a file that has my web page header and menu, similar to what I used to do with SSI.
So I have a file called menu.inc that is in the /includes folder off of the doc root.
the file has HTML in it to display a menu and header
IN my main page, I have the line
<?php include("/includes/menu.inc"); ?>
Which I would expect to insert the HTMP from menu.inc at the location of the line of code.
The content of the include file doesn't display. Instead, I get a link that says function.main and below that I get a link that says function.include
I can run other PHP code with no problem. The include files are in a folder below the doc root called Includes.
This is running on Windows 2003 Server. I did a default install of Apache 2.0 and PHP 5.
This is probably a settig in httpd.conf or php.ini but I can't seem to find it in the docs.
Any help would be greatly appreciated.
Thanks in advance,
David
--- End Message ---
--- Begin Message ---Please send messages to the newsgroup... not to my personal mailbox. -------- Original Message -------- Subject: Re: php.ini - cookies Date: Mon, 21 Feb 2005 16:56:53 -0000 From: Christian Tischler <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Thanks for that. I have tried your suggestions but no succes. I asume it's a server issue. I have the same wesite on a webserver of my ISP and it's works fine there. Christian. "Jason Barnett" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Christian Tischler wrote: ... > > This is a browser (*ahem* IE *ahem*) issue until proven otherwise... > ;) OK... so you tried the browser tips that I suggested and it didn't work. The next steps are: Check out this man page to create a raw cookie (for test purposes): http://php.net/manual/en/function.setcookie.php When you verify that you indeed can create cookies from PHP to the browser the next check is the reference page for Sessions: http://php.net/manual/en/ref.session.php#session.configuration The above link will take you straight to the php.ini directives for sessions. In particular you will want to check out session.use_only_cookies and session.cookie_* entries. > > -- > Teach a man to fish... > > NEW? | http://www.catb.org/~esr/faqs/smart-questions.html > STFA | http://marc.theaimsgroup.com/?l=php-general&w=2 > STFM | http://www.php.net/manual/en/index.php > STFW | http://www.google.com/search?q=php > LAZY | > http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+searc > h+plugins >
signature.asc
Description: OpenPGP digital signature
--- End Message ---
--- Begin Message ---Yes,
You can do that using frames.
You should have a frameset with 2 frames, one of 1px high which reloads itself every minute (and with the "1h logic")
The other one with your online test.
Hope this helps, Christophe Deliens -- get2future
Veselina Jecheva wrote:Hello, everyone,
I have to make a script, that allows the user to solve an online test (multiple choise). The test has to be solved during the specific period of time (1 hour).
How can I interrupt the user after the end of the hour and redirect him to another page with the results, for example?
Thanks in advance
Veselina
--- End Message ---
--- Begin Message ---Yes,
You can do that using frames.
You should have a frameset with 2 frames, one of 1px high which reloads itself every minute (and with the "1h logic")
The other one with your online test.
Hope this helps, Christophe Deliens -- get2future
Veselina Jecheva wrote:Hello, everyone,
I have to make a script, that allows the user to solve an online test (multiple choise). The test has to be solved during the specific period of time (1 hour).
How can I interrupt the user after the end of the hour and redirect him to another page with the results, for example?
Thanks in advance
Veselina
--- End Message ---
--- Begin Message ---Hi,
You can use the header "Content-Disposition: inline", followed by "Content-Type: application/pdf".
Then you can output your PDF file using readfile($pathToPdfFile) or print(file_get_contents($pathToPdfFile))
Hope this helps! Christophe Deliens -- get2future
Ron Herhuth wrote:I am writing a script that does a database check and then based on several conditions I need to give the user a PDF file to view in the browser. Normally I would use the header("Location: the_file.pdf") command but this doesn't work...most likely because it doesn't try to resolve the MIME type. Is there a way to load the PDF in the users browser?
Thanks, Ron
--- End Message ---
--- Begin Message ---Hi,
You can use the header "Content-Disposition: inline", followed by "Content-Type: application/pdf".
Then you can output your PDF file using readfile($pathToPdfFile) or print(file_get_contents($pathToPdfFile))
Hope this helps! Christophe Deliens -- get2future
Ron Herhuth wrote:I am writing a script that does a database check and then based on several conditions I need to give the user a PDF file to view in the browser. Normally I would use the header("Location: the_file.pdf") command but this doesn't work...most likely because it doesn't try to resolve the MIME type. Is there a way to load the PDF in the users browser?
Thanks, Ron
--- End Message ---
