userid)){" to "if(empty($_POST['userid']) ){"That's it."/> userid)){" to "if(empty($_POST['userid']) ){"That's it.">

Home  >  Article  >  CMS Tutorial  >  Solution to phpcms image not existing

Solution to phpcms image not existing

藏色散人
藏色散人Original
2020-07-18 11:38:472895browse

Solution to the problem that the phpcms image does not exist: First find and open the "attachments.php" file; then change "if(empty($this->userid)){" to "if(empty($ _POST['userid'])){".

Solution to phpcms image not existing

PHPCMS Solution to the "undefined" prompt when uploading pictures in v9

Change

in phpcms\modules\attachment\attachments.php to ## if(empty($this->userid)){

#if(empty($_POST['userid'])){

Because $this->userid must be empty when submitting, but

is used when calling

$attachment->set_userid($_POST['userid']);

And $_POST['userid'] is the data of userid.

So just change $this->userid to $_POST['userid'].

The above is the detailed content of Solution to phpcms image not existing. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn