f



Reading an MS Access Database file on *NIX platform using PHP

I'm building a small web application for a friend using PHP. He'd like to
use MS Access to keep the data in, and update the data on the site by FTP'ing 
Access files he edits on his machine up to the web host.

The web host is unix-based (FreeBSD, slightly hacked by Verio, I believe), so
this means COM functions aren't available. ODBC was my next thought, but I've
never used it, and there are a few things I don't understand. Setting up a 
DSN is one of them -- apparently this isn't as simple as constructing a string,
and all the tutorials I can find seem to involve going into a Windows control
panel and making a setting. This of course will not be possible, since there
are no windows control panels on FreeBSD.

Can anyone offer any quick tips on how to use the odbc database functions or
 PEAR::DB to query data from an MS Access file sitting on a UNIX box?

Thanks in advance!
0
8/24/2003 6:57:09 PM
comp.lang.php 32646 articles. 0 followers. Post Follow

2 Replies
981 Views

Similar Articles

[PageSpeed] 49

Weston C wrote:
> I'm building a small web application for a friend using PHP. He'd like to
> use MS Access to keep the data in, and update the data on the site by FTP'ing 
> Access files he edits on his machine up to the web host.
> 
> The web host is unix-based (FreeBSD, slightly hacked by Verio, I believe), so
> this means COM functions aren't available. ODBC was my next thought, but I've
> never used it, and there are a few things I don't understand. Setting up a 
> DSN is one of them -- apparently this isn't as simple as constructing a string,
> and all the tutorials I can find seem to involve going into a Windows control
> panel and making a setting. This of course will not be possible, since there
> are no windows control panels on FreeBSD.
> 
> Can anyone offer any quick tips on how to use the odbc database functions or
>  PEAR::DB to query data from an MS Access file sitting on a UNIX box?
> 
> Thanks in advance!


You could upload a csv file and then import it into mysql with "LOAD 
DATA INFILE 'filename' INTO table". You can create a csv file from 
Access with "Save as".

Michiel.

0
Michiel
8/25/2003 9:15:22 PM
Michiel <michiel@...NO...SPAM!*.2see.nl> wrote in
news:3f4a7c6a$0$49106$e4fe514c@news.xs4all.nl: 

> You could upload a csv file and then import it into mysql with "LOAD 
> DATA INFILE 'filename' INTO table". You can create a csv file from 
> Access with "Save as".

You can do that?

Excuse me, I'll be over in the corner, kicking myself...  :-)

Pete.
0
jonespr (34)
8/26/2003 10:02:52 AM
Reply:

Similar Artilces:

I need to create html files from php files using php
I am very new to PHP, although I have been using ASP for a few years. I use a product in ASP called ASPTear, it's a small dll that my hosting company happens to have loaded. Basically you can set up a function that you can pass an ASP page to and it will read the ASP and write out an HTML file. I use this to save load on the server and speed up my site, I have a few include files that look up data and then present it, this data does not change very often, so I run a routine called rebuildhtml.asp that will call a few ASP files and create HTML versions. I am now converting the site to PHP as I want to use mod_rewrite, what I need is a routine that I can pass a php file to and end up with an HTML version. For example rewrite(somefile.php) Will create somefile.html I am sure this can't be too difficult, but as a newbie I cannot find out how to do it. Any help appriciated. Dennis Dennis wrote: > what > I need is a routine that I can pass a php file to and end up with an > HTML version. > > For example > > rewrite(somefile.php) http://www.php.net/ob_start Happy Coding :-) -- USENET would be a better place if everybody read: | to mail me: simply | http://www.catb.org/~esr/faqs/smart-questions.html | "reply" to this post, | http://www.netmeister.org/news/learn2quote2.html | *NO* MIME, plain text | http://www.expita.com/nomime.html | and *NO* attachments. | Dennis wrote: > I am now converti...

how do I hide database connection files using PHP include files?
I have the following at the beginning of the PHP page: <?php require_once('Connections/conn.php'); ?> I want to hide the connection file, "conn.php", so it's out of the web accessible file structure. I understand putting them in the php include directory shoudl do this. For example, let's say the directory I put them in is /www/phpIN/, and /www/ht/ is the root web directory. So I put "conn.php" in the inlcude directory (/www/phpIN/conn.php) and removed it form CONNECTIONS directory. Now it doesn't work. What do I need to change? Thanks. NotGiven wrote: > I have the following at the beginning of the PHP page: > ><?php require_once('Connections/conn.php'); ?> > [...] > So I put "conn.php" in the inlcude directory (/www/phpIN/conn.php) and > removed it form CONNECTIONS directory. > > Now it doesn't work. > > What do I need to change? Try <?php require_once '/www/phpIN/conn.php'; ?> -- ..sig ...

how do I hide database connection files using PHP include files? #2
I have the following at the beginning of the PHP page: <?php require_once('Connections/conn.php'); ?> I want to hide the connection file, "conn.php", so it's out of the web accessible file structure. I understand putting them in the php include directory shoudl do this. For example, let's say the directory I put them in is /www/phpIN/, and /www/ht/ is the root web directory. So I put "conn.php" in the inlcude directory (/www/phpIN/conn.php) and removed it form CONNECTIONS directory. Now it doesn't work. What do I need to change? Thanks. On Tue, 18 Nov 2003 15:46:41 -0500, NotGiven wrote: > I have the following at the beginning of the PHP page: > > <?php require_once('Connections/conn.php'); ?> > > I want to hide the connection file, "conn.php", so it's out of the web > accessible file structure. I understand putting them in the php include > directory shoudl do this. For example, let's say the directory I put them > in is /www/phpIN/, and /www/ht/ is the root web directory. > > So I put "conn.php" in the inlcude directory (/www/phpIN/conn.php) and > removed it form CONNECTIONS directory. > > Now it doesn't work. > > What do I need to change? > > Thanks. Here's how I do it, using Apache directives. First of all, I name all include files "*.inc" Then I use an Apache directive to prevent download of ...

Reading Excel files using PHP
Hello there, Could someone pls give me pointers (or examples) on how to use PHP (installed on a linux) to read & write MS Excel spreadsheets. So far I've been converting a spreadsheet to text (as tab separated values) and processing the text file. I'm wondering if I can avoid this step and process the .xls file directly. I found a thread in this group - related to this topic - but it says, MS excel needs to be installed on target machine to use PHP's COM. I assume he's talking about PHP running on windows target machine. How can I use a similar approach on linux machine? http://groups.google.com/group/comp.lang.php/browse_frm/thread/1db1f1235e00344/8300071ba2b4434e?q=reading+excel&rnum=1#8300071ba2b4434e Any help is appreciated. Regards, Hemanth hemanth.singamsetty@gmail.com says... > Could someone pls give me pointers (or examples) on how to use PHP > (installed on a linux) to read & write MS Excel spreadsheets. So far > I've been converting a spreadsheet to text (as tab separated values) > and processing the text file. I'm wondering if I can avoid this step > and process the .xls file directly. > > I found a thread in this group - related to this topic - but it says, > MS excel needs to be installed on target machine to use PHP's COM. I > assume he's talking about PHP running on windows target machine. How > can I use a similar approach on linux machine? I found a couple of class files which...

Using PHP to read XL Spreadsheet Files?
Is there a simple way to read the content of uploaded Microsoft XL spreadsheet files? TIA <jeffsnox@gmail.com> wrote in message news:1153928631.988637.269950@s13g2000cwa.googlegroups.com... > Is there a simple way to read the content of uploaded Microsoft XL > spreadsheet files? > > TIA > not because of the xl specific coding of the document. the easiest way would be to have the spreadsheet saved either in Text (Tab Delimited) or CSV format, and then write your php to interpret that. hope this helps Phil Following on from jeffsnox@gmail.com's message. . . >Is there a simple way to read the content of uploaded Microsoft XL >spreadsheet files? > >TIA > Try www.badblue.com. Claim to be able to read,edit and share excel using PHP. Also access Word content. Sounds nifty. -- PETER FOX Not the same since the statuette business went bust peterfox@eminent.demon.co.uk.not.this.bit.no.html 2 Tees Close, Witham, Essex. Gravity beer in Essex <http://www.eminent.demon.co.uk> ...

How to read uploaded file in chunks using PHP?
Hi all, I need to read an uploaded file into chunks, so I can examine the acculative size between chunks to determine if a maximum size is being exceeded. I'm currently using the PHP function "move_uploaded_file()" to move it in one piece. But, I'm finding some clients files are bigger than I want to allow, and with that function I don't have an opportunity to determine that until the entire file has been uploaded. Thanks for any help. Don ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =---- Don <no@adr.com> wrote: > I need to read an uploaded file into chunks, so I can examine the > acculative size between chunks to determine if a maximum size is being > exceeded. I'm currently using the PHP function "move_uploaded_file()" > to move it in one piece. But, I'm finding some clients files are > bigger than I want to allow, and with that function I don't have an > opportunity to determine that until the entire file has been uploaded. AFAIK this is not possible with PHP (only). Don wrote: > > I need to read an uploaded file into chunks, so I can examine > the acculative size between chunks to determine if a maximum > size is being exceeded. No you don't. To limit the maximum size of an upload, you can ...

Using PHP to pull from MS Access DB
I've been trying to create a simple (I hope) PHP application to send emails to a membership list. I have yet to successfully connect to my database to pull the names and email addresses. I'm running XP Pro, PHP Version 4.3.2, Access 2000. I have created an ODBC System DNS connection to the database file I want to access, And I get this error: Warning: SQL error: , SQL state 00000 in SQLConnect in connecttodb.php on line 2 Whoops! Could Not Connect to ODBC Database! Here is my code: <?php $odbc = odbc_connect ('DFWMembershipDB', '', '') or die('Whoops! Could Not Connect to ODBC Database!'); ?> I'm a total novice at this, so any help you can provide would be really appreciated. Chad Lupkes Seattle, Washington as you've probably noticed, "whoops!" doesn't get you too far. i think if you output the actual error, you'd probably be able to figure it out by yourself. as for those here, "whoops!" means jack-squat. (dfw = dallas/fort worth? just curious) "chadlupkes" <chadlupkes@gmail.com> wrote in message news:1132671012.801427.224270@g43g2000cwa.googlegroups.com... | I've been trying to create a simple (I hope) PHP application to send | emails to a membership list. I have yet to successfully connect to my | database to pull the names and email addresses. I'm running XP Pro, | PHP Version 4.3.2, Access 2000. I have created an ODBC System DNS | connection to th...

Use ASP to read MS Access query that calls MS Access function
Hi: I have an MS Access query for a table called MyTable. One of my fields in the query is a custom field that looks like "MyField: = MyFunction(ID)" where ID is a field in MyTable. I have ASP code and I can use it to read the query OK when "MyField" is not part of the query. If I add in MyField and then run my ASP code to try to read all the query fields, I get an error message on my web browser which says something to the effect of "cannot find MyFunction." On the Access side, I have MyFunction set up in a module and use the keyword "Public" in front of the function name. What else do I need to do to get my ASP code to run this query. I'm trying to avoid reproducing MyFunction within the ASP code if possible. Thanks. Kevin On Thu, 14 Jun 2007 21:38:19 -0000, k-man <kmccrack@gmail.com> wrote: Sorry, no can do. From ASP you don't have access to the Access VBA interpreter. -Tom. >Hi: > >I have an MS Access query for a table called MyTable. One of my >fields in the query is a custom field that looks like "MyField: = >MyFunction(ID)" where ID is a field in MyTable. > >I have ASP code and I can use it to read the query OK when "MyField" >is not part of the query. If I add in MyField and then run my ASP >code to try to read all the query fields, I get an error message on my >web browser which says something to the effect of "cannot find >MyFunction."...

PHP does not parse .PHP files
I have this problem with PHP that someone might be able to help. With CLI, I am able to execute my .php files. For example, if I type "php phpinfo.php" , this works fine on my system. If I put the phpinfo.php file is in /var/www/html and I try to access it through the browser, I get the content of the file and not the execution of the file. Instead of display the info of PHP, I got the text of the file as: <?php phpinfo(); ?> Why? Thanks Phong Ho wrote: >I have this problem with PHP that someone might be able to help. > >With CLI, I am able to execute my .php files. For example, if I type >"php phpinfo.php" , this works fine on my system. > >If I put the phpinfo.php file is in /var/www/html and I try to access >it through the browser, I get the content of the file and not the >execution of the file. Instead of display the info of PHP, I got the >text of the file as: > ><?php > phpinfo(); >?> > > >Why? >Thanks Do you have a webserver such as Apache running on the machine where you expect this to happen? Because it's the webserver, not the browser, that needs to know about php. The browser only does html. Margaret -- (To mail me, please change .not.invalid to .net, first. Apologies for the inconvenience.) "Phong Ho" wrote: > I have this problem with PHP that someone might be able to help. > > With CLI, I am able to execute my .php files. For exam...

fyi - combination of outlook and php
Hi Folk Some of my clients asked me to create "fancy emails" for them (aka html formatted emails). I know how to make a nice html document, but I had trouble creating a simple way to provide the document to my clients so that they could use it to. I know most of them use Outlook XP or Outlook 2003, so what I created was a page that creates a Visual Basic script that, when saved to the desktop and clicked (run), opens a message in outlook using the html provided. To see this in action, please go to : http://www.rakau.com/station/index.php I would love to have some feedback. > Nicolaas Worked on: Operating System: Windows 2000 Professional (5.0, Build 2195) Service Pack 4 Language: German (Regional Setting: German) MS Office Word 2003 (11.5604.5606) Feedback: Subject, and `to:' e-mail address will be fine windandwaves wrote: > Hi Folk > > Some of my clients asked me to create "fancy emails" for them (aka html > formatted emails). > > I know how to make a nice html document, but I had trouble creating a simple > way to provide the document to my clients so that they could use it to. > > I know most of them use Outlook XP or Outlook 2003, so what I created was a > page that creates a Visual Basic script that, when saved to the desktop and > clicked (run), opens a message in outlook using the html provided. > > To see this in action, please go to : > > http://www.rakau.com/stati...

Easiest to Use Database Class
http://www.phpclasses.org/browse/package/5283.html created an easy to use database class. Takes out the redundancy of having to open and close connections, etc. Thought I'd share it. * example usage: * 1) create a file called inc.config.php in it throw this: * // include the class: * include_once('class.db.php'); * // set the variables: * $db_host = "localhost"; * $db_user = "myusername"; * $db_pass = "mypassword"; * $db_name = "mydatabasename"; * // make a db object: * $db = new mydb($db_host, $db_user, $db_pass, $db_name); * 2) now in your file that you want to access the db from just include_once('inc.config.php'); don't worry it won't connect till it's first query and it does so automagically. 3) some example usage: * // an insert * $SQL = "INSERT INTO addressbook (name) VALUES ('bob')"; * $insertid = $db->q($SQL); // returns false if no insertid or the id * echo $insertid; * * // a single row returned * $SQL = "SELECT * FROM addressbook WHERE name LIKE 'bob' LIMIT 1"; * $row = $db->row($SQL); * echo $row['name']; * * // multiple rows returned * $SQL = "SELECT * FROM addressbook"; * $addresses = $db->get($SQL); * foreach($addresses AS $address) * echo $ad...

Read the contents of a text file into MySql using PHP
Hi All, New to this, have the basics, can build a form and such. My problem is I need to be able to open a file on a pc/s on the network, read the data character by character, check to see if a certain character is present, if it is, update the database and continue reading the file until it comes across the character again, updates the database and so on . . . . Anybody got any suggestions, all help gratefuly received!! John Smith wrote: > Hi All, > > New to this, have the basics, can build a form and such. My problem is I > need to be able to open a file on a pc/s on the network, read the data > character by character, check to see if a certain character is present, if > it is, update the database and continue reading the file until it comes > across the character again, updates the database and so on . . . . > > Anybody got any suggestions, all help gratefuly received!! Hi John, Go to www.php.net and search for: - fopen() and file() to open and read files (even over http) - substr() to get pieces out of a string. Or use the array-index approach: $myStr = "hello"; echo $myStr[1]; // will echo e Regards, Erwin Moller Cheers, I'll give it a go. "Erwin Moller" <since_humans_read_this_I_am_spammed_too_much@spamyourself.com> wrote in message news:45b72211$0$335$e4fe514c@news.xs4all.nl... > John Smith wrote: > >> Hi All, >> >> New to this, have the basics, can build a form and suc...

Read MS word doc using php from linux
hi, iam new to this group. i need code to Read MS WORD document and stores in string from linux as well as from windows.... thanking u in advance Hello, On Nov 7, 12:41 pm, chowdary <php.quer...@gmail.com> wrote: > hi, > > iam new to this group. > > i need code to Read MS WORD document and stores in string from linux > as well as from windows.... don't know how this is related to PHP ... However, Openoffice provides a typically good possibility to read MS Doc format. For the impatient :-) > strings somebodies.DOC | less Regards, Roland > > thanking u in advance On 7 Nov, 12:22, Roland Mueller <roland.em0...@googlemail.com> wrote: > Hello, > > On Nov 7, 12:41 pm, chowdary <php.quer...@gmail.com> wrote: > > > hi, > > > iam new to this group. > > > i need code to Read MS WORD document and stores in string from linux > > as well as from windows.... > > don't know how this is related to PHP ... > > However, Openoffice provides a typically good possibility to read MS > Doc format. > > For the impatient :-) > > strings somebodies.DOC | less > > Regards, > Roland > > > > > thanking u in advance wv (http://wvware.sourceforge.net/) C. ...

wrong summation using php to read mysql database
want to read from a database using php commands and grouping by timetype jobdatefrom endyear and nctype and summing the groups for everymonth but instead it sums up for all the months. Here are the Codes i wrote for that: $query = mysql_query("select distinct sum(ChargeTime) as ChargeTime, sum(Amount) as AmounT , ClientName, JobDateFrom,JobDateTo,endYear,NcType from jobs where TimeType=0 group by TimeType, JobDateFrom, endYear, NcType having JobDateFrom>=Date('$startdate') and JobDateTo=('$enddate')"); thats the query i am using. Can anyone help me on this?? Its an urgent matter. thank you!! Asembereng wrote: > want to read from a database using php commands and grouping by > timetype jobdatefrom endyear and nctype and summing the groups for > everymonth but instead it sums up for all the months. Here are the > Codes i wrote for that: > > > $query = mysql_query("select distinct sum(ChargeTime) as ChargeTime, > sum(Amount) as AmounT , ClientName, > JobDateFrom,JobDateTo,endYear,NcType from jobs where TimeType=0 group > by TimeType, JobDateFrom, endYear, NcType having > JobDateFrom>=Date('$startdate') and JobDateTo=('$enddate')"); > > > > thats the query i am using. Can anyone help me on this?? Its an urgent > matter. thank you!! > Since you're asking how to compose a SQL query, I suggest you try a SQL newsgroup - like comp.databases.mysql. -- ======...

Flash embeded in PHP file accessing Mysql database....HELP
this is my code and what i get... i'm accessing this through this url http://192.168.0.2/php/test2/test.php?user=me@test.ca&subject=test it grabs the correct stuff from the database, but doesn't put it into flash. this is what i have in the flash file... onClipEvent (load) { // assuming you have a personal web server and PHP installed locally loadVariables("http://192.168.0.2/php/test2/test.php", this, "GET"); } named the textboxes, accordingly, 'name', 'email', and 'content' and the php.... <html> <head><title>Flash Test</title></head> <body> <br><br> <?php //phpinfo(); error_reporting(E_ALL); $user = $HTTP_GET_VARS['user']; $subject = $HTTP_GET_VARS['subject']; $link = mysql_connect('localhost', 'mailer', 'mailer321') or die('Could not connect: ' . mysql_error()); mysql_select_db('mailer') or die('Could not select database'); $query = "SELECT * FROM email where name = '$user' and subject = '$subject' order by id desc limit 1"; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); while ($rows = mysql_fetch_array($result)) { $name = $rows['name']; $email = $rows['subject']; $content = $rows['content']; } print "&name=$name"; print "&email=$email"; print "&content=...

How to create an ms word file from MySQL data using PHP
Hi, I have customer contact information in a MySQL DB. The standard stuff: first name, last name, city, state, zip, etc. I'd like to write a PHP script that will take a customer ID range (e.g., customer 10000 - 11000) and stick those into an MS Word document, plain text document, or a PDF (any of the three will work). The key is that each record has to have a page break after it so that each customer prints on a separate piece of paper. Anyone know how to do this? Thanks in advance for any suggestions, links to tutorials, etc. :) -- Eric Eric Linders wrote: > I have customer contact information in a MySQL DB. The standard stuff: > first name, last name, city, state, zip, etc. > > I'd like to write a PHP script that will take a customer ID range > (e.g., customer 10000 - 11000) and stick those into an MS Word > document, plain text document, or a PDF (any of the three will work). > > The key is that each record has to have a page break after it so that > each customer prints on a separate piece of paper. > > Anyone know how to do this? I'd go with the plain text document: <?php $txt_file = fopen('textfile.txt', 'wb') or die('Cannot open.'); foreach($dbrecord as $customer) { $string = 'Name: ' . $customer['name'] . "\r\n"; $string .= 'Address: ' . $customer['address'] . "\r\n"; // ... $string .= "\x0C\r\n"; ## \x0C is the "...

Php and DataBase Abstraction for mySql, Sql Server, and MS Access?
Is there a good DataBase Abstraction layer that will handle the mySql, Sql Server, and MS Access engines? I do not wish to write the same functions with the three different PHP db functions. I see that php_dba is listed as an extension, but I determine which DBs are supported. However, I think that it does not support the ones I need. Thanks David wrote: > Is there a good DataBase Abstraction layer that will handle the > mySql, Sql Server, and MS Access engines? I do not wish to write the > same functions with the three different PHP db functions. > > I see that php_dba is listed as an extension, but I determine which > DBs are supported. However, I think that it does not support the ones > I need. > > Thanks > Pear does not directly support Access -- but it supports ODBC and that'll work, otherwise you could use the PHP ODBC functions. www.php.net/odbc http://pear.php.net/package/DB Avoid the Microsoft SQL Server functions like the damned plague if you are using Windows for you webserver. They entirely suck -- I wrote my own wrapepr for that includes OCI8 MySQL and ODBC seems to work great with SQL Server. James Hello, on 09/06/2005 08:22 PM David said the following: > Is there a good DataBase Abstraction layer that will handle the > mySql, Sql Server, and MS Access engines? I do not wish to write the > same functions with the three different PHP db functions. You may want to try Metabase that is a long...

how to access data iin a MS Excel file using database components?
Can we read data in columns from an MS Excel file? It is possible to use the usual database components in the Delphi palete to read data in an excel file? but how? ...

how to read Microsoft Access MDB file, using C, from Solaris platform?
I'm trying to write a C program to read an Access MDB file and convert it to an ASCII text file. Does anyone how I can go about doing this, or if there's already codes written for this? Thanks. In article <c684dc15-7958-4de4-97fa-8d514b9badda@u38g2000pro.googlegroups.com>, Michelle <serendipity1276@yahoo.com> wrote: > I'm trying to write a C program to read an Access MDB file and convert > it to an ASCII text file. > Does anyone how I can go about doing this, or if there's already codes > written for this? Thanks. A google search showed that there...

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. ...

Is a PHP variable supposed to be seen in a .js file included into a .php file
Is a PHP variable supposed to be seen in a .js file included into a .php file? I have a client side javascript code stored in a .js file which is included into a PHP file using <script src="filename.js></script> This code initialises a Javascript variable var u="string"; The string is supposed to be the value of $HTTP_HOST So, when initialise this variable like var u=<? echo $HTTP_HOST;?>; I sterted getting a javascript message Syntax Error Am I doing something wrong, or PHP variables are not seen in included js files? aa wrote: > Is a PHP variable supposed to be seen in a .js file included into a .php > file? > > I have a client side javascript code stored in a .js file which is included > into a PHP file using > <script src="filename.js></script> > > This code initialises a Javascript variable > var u="string"; > > The string is supposed to be the value of $HTTP_HOST > > So, when initialise this variable like > > var u=<? echo $HTTP_HOST;?>; > > I sterted getting a javascript message Syntax Error > > Am I doing something wrong, or PHP variables are not seen in included js > files? js files are not parsed for PHP code unless you specifically tell the webserver to do so. Therefore, "var u=<? echo $HTTP_HOST;?>;" in the .js will error since the browser doesn't know what to do. -- Justin Koivisto - spam@koiv...

want to get content of one php file in another php file
i have one php file having content Contents of ex1.php file <body> <?php $content = "c://webserver/www/abc.php"; $handle = fopen($content, "r"); echo fread($handle,filesize($content)); ?> </body> this is reading abc.php file in which i m simply using an echo statement. When i execute ex1.php file i cant see the php statement of abc.php file content of abc.php file is <?php echo "hello";?> sarika wrote: > i have one php file having content > > Contents of ex1.php file > <body> > <?php > $content = "c://webserver/www/abc.php"; > $handle = fopen($content, "r"); > echo fread($handle,filesize($content)); > ?> > </body> > this is reading abc.php file in which i m simply using an echo > statement. When i execute ex1.php file i cant see the php statement of > abc.php file > > content of abc.php file is > <?php echo "hello";?> That's interesting, I've found out that it's the browser that's hiding <?php ?> tags within .phpx pages. Probably to avoid short tags scripts (on a server that doesn't allow them) from getting leaked by visitors who don't know about this browser trick, until the dev' realizes his error. Not a good thing, IMO; dev's should take care, themselves, and it's still not secure since the hidden string is still in the rendered source. And now we don't know how ...

Parsing a php include (which also contains php code)
Hello, I am using the <?php include() ?> statement on my website for organizational purposes. However, one of my includes contains some PHP code. Is there any way for the server to actually parse the include? I've tried this before, and it did not parse the include. Rather, it included the file as just plain ASCII. ======================= /*EXAMPLE 1*/ /*index.php*/ .... <?php include('global/includes/footer.inc') ?> .... /*footer.inc*/ .... <p>&copy 1993-<?php echo date("Y") ?> Kingswood School. All rights reserved.</p> .... /*EXAMPLE 2*/ /*index.php*/ .... <?php include('global/includes/lastmod.php') ?> .... /*lastmod.php*/ .... <?php echo "This file was last modified: "; echo strftime("%A %B %d %Y"); include('whateverfilename.inc'); ?> ============================= I would like to be able to parse the include if it has php code, and in some cases, create nesting includes (an include within an include). Is this even possible? Any ideas? Any help is certainly appreciated. Thanks! Steven Borrelli Web Developer Kingswood School Steven Borrelli wrote: > Hello, > > I am using the <?php include() ?> statement on my website for > organizational purposes. However, one of my includes contains some > PHP code. Is there any way for the server to actually parse the > include? I've tried this before, and it did not parse the in...

Uploading file to a different web platform using ASP.NET/VB.NET and php
Hi, I've been trying to upload file using webclient.uploadfile method from my IIS webserver to an Apache webserver without any success. On the Apache server (server that receives the incoming file) I have a simple php script, getFile.php to receive the file. The script look like this: <?php $uploadDir = '/var/www/Incoming/'; $uploadFile = $uploadDir . $_FILES['userfile']['name']; print "<pre>"; if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadFile)) { print "File is valid, and was successfully uploaded. "; print "Here's some more debugging info:\n"; print_r($_FILES); } else { print "Error receiving file:\n"; print_r($_FILES); } print "</pre>"; ?> I know this script work perfectly if I use a standard html with <input type="file"> method. However, file needs to be sent from an asp.net page instead of html. People on the newsgroup have been suggesting me to use webclient.uploadfile method, however, I just could not get it to work. Perhaps there is something wrong with my php script or maybe there something else needs to be done to the webclient. If anybody has came across with the similar situation, can you show me how to do it both on the ASP.NET side and php side (or perl) Thanks Brian On Tue, 08 Mar 2005 06:43:39 -0800, brianinbox wrote: > I know this script work perfectly if I use a standard html wi...

Web resources about - Reading an MS Access Database file on *NIX platform using PHP - comp.lang.php

Database - Wikipedia, the free encyclopedia
A database is an organized collection of data . The data are typically organized to model aspects of reality in a way that supports processes ...

Database - Wikipedia, the free encyclopedia
... requiring information. For example, modelling the availability of rooms in hotels in a way that supports finding a hotel with vacancies. Database ...

Fearing no punishment, Denver cops abuse crime databases for personal gain
(credit: Noel Hidalgo ) Denver police officers performed searches on state and federal criminal justice databases that were not work-related ...

Open source database improves protection and performance
Most enterprises rely on databases in some form or another, but they can be vulnerable to attack from people looking to steal information. They ...

Seattle’s Tableau Software snaps up database-computing startup in Germany
Seattle’s Tableau Software has acquired HyPer, a database-computing startup that spun out of research at a university in Munich, Germany. As ...

Amazon Web Services Announces that over 1,000 Databases Have Migrated to AWS since January 1, 2016
Amazon Web Services, Inc. (AWS), today announced that the AWS Database Migration Service is now generally available.

Taiwan launches database on areas vulnerable to quake damage
BEIJING (AP) — Earthquake-prone Taiwan is launching a database to inform residents which areas might be susceptible to creating potentially catastrophic ...

Interior Dept Spent $15 Million On A Crime Database That Doesn’t Work
Interior Dept Spent $15 Million On A Crime Database That Doesn’t Work

Microsoft's SQL database software now runs on Linux
Remember when Steve Ballmer likened Linux to cancer, and the notion of Microsoft courting the open source crowd was virtually unimaginable? The ...

Crate Raises $4M for New Container Database Technology
The founder of Docker Inc. invests in new technology that provides a very different and very distributed way to build a container database.

Resources last updated: 3/24/2016 6:47:17 AM