- Try and fix problem with opening wrong file.

This commit is contained in:
Andi Gutmans 2000-08-27 18:01:17 +00:00
parent 66dfb8aac1
commit 39770d99ea
5 changed files with 295 additions and 16 deletions

View file

@ -1146,16 +1146,8 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_
if (primary_file->type == ZEND_HANDLE_FILENAME
&& primary_file->filename) {
char *filename;
filename = strrchr(primary_file->filename, PHP_DIR_SEPARATOR);
if (filename) {
filename++;
V_GETCWD(old_cwd, sizeof(old_cwd)-1);
V_CHDIR_FILE(primary_file->filename);
primary_file->filename = filename;
}
V_GETCWD(old_cwd, sizeof(old_cwd)-1);
V_CHDIR_FILE(primary_file->filename);
}
if (PG(auto_prepend_file) && PG(auto_prepend_file)[0]) {