Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
|
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 20th, 2004, 05:54 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

sometimes we may file permission problem as i'm having:

when creating files in root folder where $page_name is file name; even chmod("/$page_name.php", 777); is not helping.

i can't 'up this folder' so that i can change its permissions to write by right-clicking it in cuteFTP!

 
Old December 20th, 2004, 09:03 AM
Authorized User
 
Join Date: Dec 2004
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to colin.horne
Default

Anshul:

Never never never never never never never never write files like that in the root folder!!

When you FTP in, you're probably chrooted to your home folder (eg: /home/anshul), which means you cannot get outof that folder. There's a reason for that too ;)

If you just start writing files in any old folder, you're going to really clog up your file system. Make sure all your files stay in /home/myusername. The only exception might be for writing tempory files in /tmp.

Cheers

Edit note:

In addition, you shouldn't have the privileges to write into the root folder. If you do, you're running php (or apache, if it's being access via www) as root, which is very bad practise. I've only ever had to run php as root a few times in my life, and that was only for a very small script that I spent 10 minutes writing and 10 hours checking before running it.

--
Please contact me at:
Colin (dot) Horne (at) gmail (dot) com
 
Old January 5th, 2005, 03:09 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

> My only worry about doing that is if variables in the template get displayed by accident
That's an unlikely scenario for most sites.

There are some nifty PHP Templating solutions out there already written and available.

I hear this one is pretty good, but I've never tried it out personally. (I wrote my own templating system in PHP a few years ago)
http://phpsavant.com/yawiki/

As I understand it, Savant uses PHP as its templating language.

You might also look in PEAR:
http://pear.php.net/packages.php?cat...=HTML&pageID=2

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design





Similar Threads
Thread Thread Starter Forum Replies Last Post
write HTML into TEXTAREA using PHP anshul PHP How-To 6 March 27th, 2009 12:15 PM
Writing HTML in VB osemollie Pro VB Databases 5 September 11th, 2006 02:01 PM
HTML formatted text via xsl templates? beckfield XSLT 2 February 26th, 2005 01:48 PM
HTML Templates tsimsha HTML Code Clinic 4 November 8th, 2004 06:32 PM
php in html natmaster Beginning PHP 4 August 1st, 2003 02:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.