Re: Saving compiled template fails. file_exists() problem?
| From: | Craig H. Anderson | Date: | Sun, 29 Dec 2002 09:44:36 +0000 |
| Subject: | Re: Saving compiled template fails. file_exists() problem? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6960@lists.php.net to get a copy of this message | ||
Here is a patch to Smarty.class.php that
got my script to work.
The top of the file looks like this:
<?php
/*
* Project: Smarty: the PHP compiling template engine * File: Smarty.class.php * Author: Monte Ohrt <monte@ispi.net> * Andrei Zmievski <andrei@php.net>*
* Version: 2.3.1diff Smarty.class.php.orig Smarty.class.php 1599a1600,1603
$cwd = posix_getcwd(); /* cha */
$dir_full_path = $cwd; /* cha */
$dir_full_path .= '/'; /* cha */
$dir_full_path .= $dir; /* cha */
1629c1633,1636
< if ($_make_new_dir && !@file_exists($_new_dir) && !@mkdir($_new_dir, 0771)) {
---
$fp = posix_getcwd(); /* cha */
$fp .= '/'; /* cha */
$fp .= $_new_dir; /* cha */
if ($_make_new_dir && !@file_exists($fp) && !@mkdir($_new_dir, 0771)) {