mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
- Try and fix problem with opening wrong file.
This commit is contained in:
parent
66dfb8aac1
commit
39770d99ea
5 changed files with 295 additions and 16 deletions
12
main/main.c
12
main/main.c
|
@ -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]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue