Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Read text from a file and display


ldavies83

Recommended Posts

Posted

I saw a post a couple of months back for updating the Shipping & Returns page to read a text file into the PHP template. This made rolling out multiple shops very easy. However I cannot find it anywhere now. I believe the syntax would be similar to this:

 

MyText = "e:wwwrootSandR.txt"

define('TEXT_INFORMATION', MyText);

 

But I dont know what the keyword to read the file in would be. Anybody be able to figure this one out, as it's very handy for T's & C's, etc

 

 

Thanks,

 

L.

Contribs Written: Nochex APC Payment Module, Cheque Payment Module

Contribs Updated: Information Pages Unlimited, Latest News V1

You've gotta be Quick on the Draw in this game!

Posted

Have a look at www.php.net/read and www.php.net/file

That should make clear what to do.

 

Regards,

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Posted

Thanks Mattice, as usual you my sir, are a bonified star :stupid:

 

For future reference, there are two ways of doing this, one by file, the other by database:

 

by file: use the PHP command 'readfile' (help available at http://www.php.net/manual/en/function.readfile.php)

 

By Database, I found this contrib:

 

http://www.oscommerce.com/community/contri...ions,544/page,4

 

As always a kick in the right direction is generally all that is needed. Thanks again for your swift response.

 

 

L.

Contribs Written: Nochex APC Payment Module, Cheque Payment Module

Contribs Updated: Information Pages Unlimited, Latest News V1

You've gotta be Quick on the Draw in this game!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...